mesa/src
M Henning 41f8ef617c nvk: Don't clobber vb0 after repeated blits
If a program does two blits in a row, we internally do a sequence of
operations that involves binding vb0.

Previously, the vb0 state after each operation would look something like:

| operation                    | cmd->state.gfx.vb0 | hardware  | save->vb0 |
| ---------------------------- | ------------------ | --------- | --------- |
|                              | user               | user      |           |
| nvk_meta_begin()             | user               | user      | user      |
| BindVertexBuffers(internal0) | internal0          | internal0 | user      |
| nvk_meta_end()               | internal0          | user      |           |
| nvk_meta_begin()             | internal0          | user      | internal0 |
| BindVertexBuffers(internal1) | internal1          | internal1 | internal0 |
| nvk_meta_end()               | internal1          | internal0 |           |

That is, CmdBindVertexBuffers() would update cmd->state.gfx.vb0, but
nvk_meta_end() would not. This meant that the last operation would bind a
driver-internal buffer instead of the original value that the user set.

This change fixes the issue by tracking cmd->state.gfx.vb0 in
nvk_cmd_bind_vertex_buffer(), which both CmdBindVertexBuffers() and
nvk_meta_end() call into.

After this commit, the state looks like:

| operation                    | cmd->state.gfx.vb0 | hardware  | save->vb0 |
| ---------------------------- | ------------------ | --------- | --------- |
|                              | user               | user      |           |
| nvk_meta_begin()             | user               | user      | user      |
| BindVertexBuffers(internal0) | internal0          | internal0 | user      |
| nvk_meta_end()               | user               | user      |           |
| nvk_meta_begin()             | user               | user      | user      |
| BindVertexBuffers(internal1) | internal1          | internal1 | user      |
| nvk_meta_end()               | user               | user      |           |

To test this commit, build gtk4 commit 87b66de1, run:

    GSK_RENDERER=vulkan gtk4-demo --run=image_scaling

then select trilinear filtering in the dropdown and check for rendering
artifacts.

Fixes: e1c66501 ("nvk: Use vk_meta for CmdClearAttachments")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27559>
(cherry picked from commit d98ff2cc4a)
2024-02-14 18:36:34 +00:00
..
amd aco: don't remove branches that skip v_writelane_b32 2024-02-14 18:36:33 +00:00
android_stub
asahi nir: rework and fix rotate lowering 2024-01-23 20:52:01 +00:00
broadcom broadcom/compiler: be more careful with unifa in non-uniform control flow 2024-01-31 22:24:25 +00:00
c11 util/meson: Getting mesa util core to be self contained 2023-08-02 03:41:24 +00:00
compiler glsl: don't tree graft globals 2024-02-02 16:50:13 +00:00
drm-shim drm-shim: Avoid assertion fail if someone does close(-1). 2023-06-01 01:50:41 +00:00
egl egl/drm: flush before calling get_back_bo 2024-02-02 16:50:10 +00:00
etnaviv etnaviv: drm: Be able to mark end of context init 2023-10-23 14:56:48 +00:00
freedreno mesa: plumb errors through to texture allocation 2024-02-14 18:35:56 +00:00
gallium zink: adjust swizzled deref loads by the variable component offset 2024-02-14 18:35:58 +00:00
gbm gbm: delete some zink handling 2023-10-09 18:43:09 +00:00
getopt
glx glx: Handle IGNORE_GLX_SWAP_METHOD_OML regardless of GLX_USE_APPLEGL 2023-12-20 00:04:54 +00:00
gtest gtest: backport ansi color fix 2023-08-18 21:33:14 +00:00
imagination pvr: Fix VK_EXT_texel_buffer_alignment 2023-11-07 13:28:06 +00:00
imgui
intel hasvk: add missing linker arguments 2024-02-14 18:35:59 +00:00
loader tree-wide: use __normal_user() everywhere instead of writing the check manually 2024-01-31 20:19:17 +00:00
mapi mesa: add GL_APPLE_sync support 2023-10-20 17:20:11 +00:00
mesa mesa: plumb errors through to texture allocation 2024-02-14 18:35:56 +00:00
microsoft nir: rework and fix rotate lowering 2024-01-23 20:52:01 +00:00
nouveau nvk: Don't clobber vb0 after repeated blits 2024-02-14 18:36:34 +00:00
panfrost pan/va: Add missing valhall_enums dep to valhall_disasm 2024-02-14 18:35:54 +00:00
tool radeonsi: Add tracepoints in radeonsi driver 2023-10-19 16:16:16 +00:00
util driconf: Apply dual color blending workaround to Dying Light 2024-02-14 17:36:35 +00:00
virtio venus: refactor query feedback cmds 2024-02-02 16:55:43 +00:00
vulkan vk/util: fix 'beta' check for physical device properties 2024-02-02 16:50:02 +00:00
.clang-format nir: Add nir_foreach_block_in_cf_node_reverse 2023-09-22 10:05:58 +00:00
meson.build nvk: add vulkan skeleton 2023-08-04 21:31:52 +00:00