Commit Graph

32824 Commits

Author SHA1 Message Date
Matt Borgerson 3f0a7e514d nv2a/vk: Fix display dimensions 2024-12-31 01:37:05 -07:00
Matt Borgerson 9c43c0d702 nv2a/vk: Add barrier after compute to staging buffer copy 2024-12-31 01:37:05 -07:00
Matt Borgerson 89db9590f7 nv2a/vk: Flush vertex ram buffer, insert barrier 2024-12-31 01:37:05 -07:00
Matt Borgerson 9ab8549a4e nv2a/vk: Insert barrier after staging buffer copies 2024-12-31 01:37:05 -07:00
Matt Borgerson 1a57d4ae94 nv2a/vk: Fix finish queue submission semaphore wait stage 2024-12-31 01:37:05 -07:00
Matt Borgerson 84c09c631c nv2a/vk: Ensure error message is always set on instance failure 2024-12-31 01:37:05 -07:00
Matt Borgerson 0169caadd0 nv2a/vk: Fallback to UBO if maxPushConstantsSize is insufficient 2024-12-31 01:37:05 -07:00
Matt Borgerson 792ed56d58 nv2a: Block renderer finalization on display present 2024-12-31 01:37:05 -07:00
Matt Borgerson 25afb8603d nv2a: Handle renderer init errors more gracefully 2024-12-31 01:37:05 -07:00
Matt Borgerson c1bbe39f22 nv2a/gl: Rename some functions for clarity 2024-12-31 01:37:05 -07:00
Matt Borgerson f3b6d50d99 nv2a: Merge renderer init, init_thread methods 2024-12-31 01:37:05 -07:00
Matt Borgerson 98fa394f84 nv2a: Add note about downloading dirty surfaces during flush 2024-12-31 01:37:05 -07:00
Matt Borgerson 6fd0f175b4 nv2a: Support switching renderers at runtime 2024-12-31 01:37:05 -07:00
Matt Borgerson 7b6b5f396c nv2a/vk: Release report queue nodes at finalize 2024-12-31 01:37:05 -07:00
Matt Borgerson 3ccea5fa12 nv2a/vk: Release renderer state at finalize 2024-12-31 01:37:05 -07:00
Matt Borgerson d6e8307950 nv2a/vk: Always provide early_context_init 2024-12-31 01:37:05 -07:00
Matt Borgerson c4ac083d3d nv2a/vk: Sync RAM buffer during renderer init 2024-12-31 01:37:05 -07:00
Matt Borgerson 71d00d2208 nv2a/vk: Ensure texture bindings exist before dirty check 2024-12-31 01:37:05 -07:00
Matt Borgerson 4bd0406797 nv2a/gl: Make sure vulkan is not set on ShaderState 2024-12-31 01:37:05 -07:00
Matt Borgerson cd2278dd62 nv2a/gl: Ensure shader_binding exists before dirty check 2024-12-31 01:37:05 -07:00
Matt Borgerson 84dd112186 nv2a/gl: Improve renderer teardown 2024-12-31 01:37:05 -07:00
Matt Borgerson c1eb48b62f nv2a/vk: Fix snode->geometry init 2024-12-31 01:37:05 -07:00
Matt Borgerson 40526389f6 nv2a/vk: Clear bindings before tearing down cache 2024-12-31 01:37:05 -07:00
Matt Borgerson 6403c69326 nv2a/vk: Fix shader cache node init flag 2024-12-31 01:37:05 -07:00
Matt Borgerson fadaf19cdd nv2a/vk: Fix GArray free 2024-12-31 01:37:05 -07:00
Matt Borgerson 1973ed7f58 n2va/vk: Drop debug message 2024-12-31 01:37:05 -07:00
Matt Borgerson 27531ec1ca nv2a: Wrap nv2a_vm_state_change direct renderer calls 2024-12-31 01:37:05 -07:00
Matt Borgerson 093e654725 nv2a: Wrap pfifo direct renderer calls 2024-12-31 01:37:05 -07:00
Matt Borgerson 2800b8d22a meson: Move VMA options into meson config 2024-12-31 01:37:05 -07:00
Matt Borgerson 2bc8cb3050 nv2a/vk: Remove extraneous VK_NO_PROTOTYPES defn 2024-12-31 01:37:05 -07:00
Matt Borgerson a5385803db nv2a: Add Vulkan renderer 2024-12-31 01:37:05 -07:00
Matt Borgerson 212988421f mcpx: Remove set but not used count variable 2024-12-29 18:42:12 -07:00
Fred Hallock 79441500fe
nv2a: Check supported line width
* Added logic to check for the supported line width range before setting the line width to avoid errors.

I also moved the glLineWidth call so that it could be after the call to get the supported line width range for the desired line type.

* Moved the glLineWidth call outside the if/else

* Moved the code to query line GL_SMOOTH_LINE_WIDTH_RANGE and GL_ALIASED_LINE_WIDTH_RANGE to nv2a_gl_context_init(void) so that it's just called while OpenGL is being initialized.

* Removed the lineWidth local variable. It's simpler to just call glLineWidth in the if and else blocks
2024-11-23 11:49:01 +13:00
Fred Hallock 7f5176bc5f
nv2a: Scale line thickness by surface scale factor 2024-11-14 21:48:22 -07:00
Matt Borgerson a8d8ef5484 nv2a: Drop unused ShaderState field material_alpha 2024-07-22 23:52:43 -07:00
Ryzee119 e7633ed4a5 eeprom: Use sha1 and rc4 util for hashing functions 2024-06-12 17:29:02 -07:00
Matt Borgerson 2be220df98 nv2a: Implement HILO texture modifier 2024-05-21 00:44:29 -07:00
Matt Borgerson b3fc80b3a8 nv2a: Implement ZCLIP_MIN,MAX with gl_ClipDistance 2023-10-22 00:22:03 -07:00
Matt Borgerson 5fa08d20d6 nv2a: Scale Z by full depth range in inverse viewport transform 2023-10-22 00:22:03 -07:00
Matt Borgerson d6e5342f89 nvnet: Add unicast and multicast filtering 2023-10-18 01:33:40 -07:00
Matt Borgerson ccb1211cd6 nvnet: Use HWADDR_PRIx for debug hwaddr printing 2023-10-18 01:33:40 -07:00
Matt Borgerson de611d611b nv2a: Left-align surface type in nv2a_pgraph_surface_target trace 2023-07-27 22:23:52 -07:00
Matt Borgerson 5c495db618 nv2a: Add [last_]surface_shape.clip_y to vmstate 2023-07-27 22:09:02 -07:00
Matt Borgerson 0f27526006 v7.2.4 release
-----BEGIN PGP SIGNATURE-----
 
 iQFDBAABCAAtFiEEe3O61ovnosKJMUsicBtPaxppPlkFAmSp1ksPHG1qdEB0bHMu
 bXNrLnJ1AAoJEHAbT2saaT5ZaU4IAKVA9cUkF8IORzcZ8iXy6kTjLNYXd458nURO
 PkrZ0DZfnUJTmyUDoR5gjZrZhRvvHGSyAnwBvd1WLeFZgD2yD2i2ZZczfI3uc3ov
 LkW6mMJRVEWFlszA6SCbFtZ+Z9hgbJidQmb+SxxxnCmrnQF48ysQ0Feg/B4TObMt
 Ej/xMEF52Ujr4VDe3Iq6dXp/AT8NwShEEc1VWFXbNJCNp2BM31FC21cFENPiv2y3
 2E8n+wOGxSSayArOEkgov55Mre9M7L79hOhRXgp0EmJP/nxmm9GTv5rETrT5USr7
 rZzDrsfS3muSArsGd7J4NkvyrParNmIBjSrOK0zX5p8pg9pVJ7U=
 =o+if
 -----END PGP SIGNATURE-----

Merge tag 'v7.2.4' into sync/qemu-7.2.0

v7.2.4 release
2023-07-17 03:29:42 -07:00
Matt Borgerson 8da35b81a8 Merge remote-tracking branch 'origin/master' into sync/qemu-7.2.0 2023-07-15 17:24:01 -07:00
Erik Abair 7bfb7c8537 nv2a: Remove assert on TEXGEN_OBJECT_LINEAR
The behavior seems to match HW.

[Test](https://github.com/abaire/nxdk_pgraph_tests/blob/main/src/tests/texgen_tests.cpp#L22)
![HW results](https://github.com/abaire/nxdk_pgraph_tests_golden_results/wiki/Results-Texgen#objectlinearpng)

Fixes #379
2023-07-09 21:19:43 -07:00
Erik Abair 22aaac801c nv2a: Compile fix for DEBUG_NV2A enabled 2023-07-08 21:52:41 -07:00
Shameer Kolothum 3b1b9aa4d5 vfio/pci: Call vfio_prepare_kvm_msi_virq_batch() in MSI retry path
When vfio_enable_vectors() returns with less than requested nr_vectors
we retry with what kernel reported back. But the retry path doesn't
call vfio_prepare_kvm_msi_virq_batch() and this results in,

qemu-system-aarch64: vfio: Error: Failed to enable 4 MSI vectors, retry with 1
qemu-system-aarch64: ../hw/vfio/pci.c:602: vfio_commit_kvm_msi_virq_batch: Assertion `vdev->defer_kvm_irq_routing' failed

Fixes: dc580d51f7 ("vfio: defer to commit kvm irq routing when enable msi/msix")
Reviewed-by: Longpeng <longpeng2@huawei.com>
Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
(cherry picked from commit c174088923)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2023-06-30 19:02:13 +03:00
Zhenzhong Duan c7b6b705ef vfio/pci: Fix a segfault in vfio_realize
The kvm irqchip notifier is only registered if the device supports
INTx, however it's unconditionally removed in vfio realize error
path. If the assigned device does not support INTx, this will cause
QEMU to crash when vfio realize fails. Change it to conditionally
remove the notifier only if the notify hook is setup.

Before fix:
(qemu) device_add vfio-pci,host=81:11.1,id=vfio1,bus=root1,xres=1
Connection closed by foreign host.

After fix:
(qemu) device_add vfio-pci,host=81:11.1,id=vfio1,bus=root1,xres=1
Error: vfio 0000:81:11.1: xres and yres properties require display=on
(qemu)

Fixes: c5478fea27 ("vfio/pci: Respond to KVM irqchip change notifier")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
(cherry picked from commit 357bd7932a)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2023-06-30 19:00:39 +03:00
Nicholas Piggin 4d8459c365 target/ppc: Fix decrementer time underflow and infinite timer loop
It is possible to store a very large value to the decrementer that it
does not raise the decrementer exception so the timer is scheduled, but
the next time value wraps and is treated as in the past.

This can occur if (u64)-1 is stored on a zero-triggered exception, or
(u64)-1 is stored twice on an underflow-triggered exception, for
example.

If such a value is set in DECAR, it gets stored to the decrementer by
the timer function, which then immediately causes another timer, which
hangs QEMU.

Clamp the decrementer to the implemented width, and use that as the
value for the timer calculation, effectively preventing this overflow.

Reported-by: sdicaro@DDCI.com
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20230530131214.373524-1-npiggin@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
(cherry picked from commit 09d2db9f46)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2023-06-30 09:18:28 +03:00