freedreno/a6xx: Fix SP_GS_PRIM_SIZE for large sizes

This fixes a few piglit hangs.

Fixes: 0eebedb ("freedreno/a6xx: Emit program state for GS")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10551>
(cherry picked from commit e7b7908f87)
This commit is contained in:
Connor Abbott 2021-04-30 18:05:37 +02:00 committed by Eric Engestrom
parent 1947597f74
commit 2ceb11aaa8
4 changed files with 8 additions and 3 deletions

View file

@ -1777,7 +1777,7 @@
"description": "freedreno/a6xx: Fix SP_GS_PRIM_SIZE for large sizes",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "0eebedb6190fdab8956769b2485180cc4a07119a"
},

View file

@ -901,8 +901,13 @@ setup_stateobj(struct fd_ringbuffer *ring, struct fd_context *ctx,
OUT_PKT4(ring, REG_A6XX_PC_MULTIVIEW_CNTL, 1);
OUT_RING(ring, 0);
uint32_t prim_size = prev->output_size;
if (prim_size > 64)
prim_size = 64;
else if (prim_size == 64)
prim_size = 63;
OUT_PKT4(ring, REG_A6XX_SP_GS_PRIM_SIZE, 1);
OUT_RING(ring, prev->output_size);
OUT_RING(ring, prim_size);
} else {
OUT_PKT4(ring, REG_A6XX_PC_PRIMITIVE_CNTL_6, 1);
OUT_RING(ring, 0);

View file

@ -545,7 +545,6 @@ spec@glsl-1.50@execution@primitive-id-no-gs-quads,Fail
spec@glsl-1.50@execution@variable-indexing@gs-input-array-float-index-rd,Fail
spec@glsl-1.50@execution@variable-indexing@gs-input-array-vec2-index-rd,Fail
spec@glsl-1.50@execution@variable-indexing@gs-input-array-vec3-index-rd,Crash
spec@glsl-1.50@execution@variable-indexing@gs-input-array-vec4-index-rd,Fail
spec@glsl-1.50@execution@variable-indexing@gs-output-array-vec3-index-wr,Fail
spec@glsl-1.50@execution@variable-indexing@gs-output-array-vec4-index-wr,Crash
spec@glsl-1.50@execution@variable-indexing@vs-output-array-vec3-index-wr-before-gs,Fail

View file

@ -1,5 +1,6 @@
# Can wedge the GPU
vs-output-array-vec2-index-wr-before-gs
gs-input-array-vec4-index-rd
# These take most of a minute to run
spec@!opengl 3.0@clearbuffer-depth-cs-probe