r600: fix rv770 read scratch compatibility
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

The flag mega_fetch should be set on rv770 for a
read scratch operation (as written in the r700
documentation p357). Without this flag, read scratch
does not work and a gpu hang could be triggered.

Here are the tests fixed:
shaders/glsl-predication-on-large-array: fail pass
spec/glsl-1.10/execution/temp-array-indexing/glsl-fs-giant-temp-array: fail pass
spec/glsl-1.10/execution/temp-array-indexing/glsl-vs-giant-temp-array: fail pass
spec/glsl-1.30/execution/fs-large-local-array: fail pass
spec/glsl-1.30/execution/fs-large-local-array-vec2: fail pass
spec/glsl-1.30/execution/fs-large-local-array-vec3: fail pass
spec/glsl-1.30/execution/fs-large-local-array-vec4: fail pass
spec/glsl-1.30/execution/fs-multiple-large-local-arrays: fail pass

Fixes: 9c48a139b0 ("r600g: Support emitting scratch ops")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38353>
This commit is contained in:
Patrick Lerda 2025-11-10 12:56:26 +01:00 committed by Marge Bot
parent d77279fa9b
commit f8de09a811
3 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,3 @@
spec@!opengl 3.2@gl-3.2-adj-prims pv-last
spec@!opengl 3.2@layered-rendering@gl-layer-render-clipped
spec@arb_fragment_layer_viewport@viewport-gs-write-simple
spec@glsl-1.30@execution@fs-large-local-array-vec4

View file

@ -7,7 +7,6 @@ texelfetch@gs
# GPU hangs now
variable-indexing@gs-in
fs-multiple-large-local-arrays
# intermittent GL_OOMs, let's make sure that doesn't impact other tests.
spec@!opengl 1.2@tex3d-maxsize

View file

@ -139,7 +139,9 @@ int r700_bytecode_fetch_mem_build(struct r600_bytecode *bc, struct r600_bytecode
bc->bytecode[id++] = S_SQ_MEM_RD_WORD2_ARRAY_BASE(mem->array_base) |
S_SQ_MEM_RD_WORD2_ENDIAN_SWAP(0) |
S_SQ_MEM_RD_WORD2_ARRAY_SIZE(mem->array_size);
S_SQ_MEM_RD_WORD2_ARRAY_SIZE(mem->array_size) |
(bc->gfx_level == R700 && opcode == 0 ?
S_SQ_VTX_WORD2_MEGA_FETCH(1) : 0);
bc->bytecode[id++] = 0; /* MEM ops are 4 word aligned */