freedreno/a6xx: Fix xfb stream configuration
Also, only emit PC_SO_STREAM_CNTL for tess shaders, to align with how turnip does it. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23301>
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
# Shader compilation error log: 0:6(1): error: invalid stream specified 1 is larger than MAX_VERTEX_STREAMS - 1
|
||||
KHR-GL45.transform_feedback.draw_xfb_stream_instanced_test,Fail
|
||||
|
||||
KHR-GL45.gpu_shader_fp64.fp64.max_uniform_components,Fail
|
||||
KHR-GL45.shader_subroutine.control_flow_and_returned_subroutine_values_used_as_subroutine_input,Fail
|
||||
KHR-GL45.shader_image_load_store.basic-allFormats-store,Fail
|
||||
@@ -120,7 +117,6 @@ spec@arb_vertex_type_2_10_10_10_rev@attrib-p-type-size-match,Fail
|
||||
|
||||
# fails unrelated to GL_ARB_enhanced_layouts
|
||||
spec@arb_enhanced_layouts@execution@component-layout@vs-fs-array-dvec3,Crash
|
||||
spec@arb_enhanced_layouts@gs-stream-location-aliasing,Fail
|
||||
|
||||
# fails on gen1 (a618/a630) with both fd and zink, but passes on gen4..
|
||||
# maybe gen1 sqe doesn't handle the count==0 case?
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
# Shader compilation error log: 0:6(1): error: invalid stream specified 1 is larger than MAX_VERTEX_STREAMS - 1
|
||||
KHR-GL45.transform_feedback.draw_xfb_stream_instanced_test,Fail
|
||||
|
||||
KHR-GL45.gpu_shader_fp64.fp64.max_uniform_components,Fail
|
||||
|
||||
KHR-GL45.polygon_offset_clamp.PolygonOffsetClampMinMax,Fail
|
||||
@@ -126,7 +123,6 @@ spec@arb_vertex_type_2_10_10_10_rev@attrib-p-type-size-match,Fail
|
||||
|
||||
# fails unrelated to GL_ARB_enhanced_layouts
|
||||
spec@arb_enhanced_layouts@execution@component-layout@vs-fs-array-dvec3,Crash
|
||||
spec@arb_enhanced_layouts@gs-stream-location-aliasing,Fail
|
||||
|
||||
# fails on gen1 (a618/a630) with both fd and zink, but passes on gen4..
|
||||
# maybe gen1 sqe doesn't handle the count==0 case?
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
# Shader compilation error log: 0:6(1): error: invalid stream specified 1 is larger than MAX_VERTEX_STREAMS - 1
|
||||
KHR-GL45.transform_feedback.draw_xfb_stream_instanced_test,Fail
|
||||
|
||||
KHR-GL45.direct_state_access.renderbuffers_storage_multisample,Fail
|
||||
KHR-GL45.gpu_shader_fp64.fp64.max_uniform_components,Fail
|
||||
KHR-GL45.multi_bind.dispatch_bind_image_textures,Fail
|
||||
|
||||
@@ -244,8 +244,12 @@ setup_stream_out(struct fd_context *ctx, struct fd6_program_state *state,
|
||||
prog_count += end - start + 1;
|
||||
}
|
||||
|
||||
const bool emit_pc_so_stream_cntl =
|
||||
ctx->screen->info->a6xx.tess_use_shared &&
|
||||
v->type == MESA_SHADER_TESS_EVAL;
|
||||
|
||||
unsigned sizedw = 10 + (2 * prog_count);
|
||||
if (ctx->screen->info->a6xx.tess_use_shared)
|
||||
if (emit_pc_so_stream_cntl)
|
||||
sizedw += 2;
|
||||
|
||||
struct fd_ringbuffer *ring =
|
||||
@@ -254,11 +258,15 @@ setup_stream_out(struct fd_context *ctx, struct fd6_program_state *state,
|
||||
OUT_PKT7(ring, CP_CONTEXT_REG_BUNCH, sizedw);
|
||||
OUT_RING(ring, REG_A6XX_VPC_SO_STREAM_CNTL);
|
||||
OUT_RING(ring,
|
||||
A6XX_VPC_SO_STREAM_CNTL_STREAM_ENABLE(0x1) |
|
||||
COND(strmout->stride[0] > 0, A6XX_VPC_SO_STREAM_CNTL_BUF0_STREAM(1)) |
|
||||
COND(strmout->stride[1] > 0, A6XX_VPC_SO_STREAM_CNTL_BUF1_STREAM(1)) |
|
||||
COND(strmout->stride[2] > 0, A6XX_VPC_SO_STREAM_CNTL_BUF2_STREAM(1)) |
|
||||
COND(strmout->stride[3] > 0, A6XX_VPC_SO_STREAM_CNTL_BUF3_STREAM(1)));
|
||||
A6XX_VPC_SO_STREAM_CNTL_STREAM_ENABLE(strmout->streams_written) |
|
||||
COND(strmout->stride[0] > 0,
|
||||
A6XX_VPC_SO_STREAM_CNTL_BUF0_STREAM(1 + strmout->output[0].stream)) |
|
||||
COND(strmout->stride[1] > 0,
|
||||
A6XX_VPC_SO_STREAM_CNTL_BUF1_STREAM(1 + strmout->output[1].stream)) |
|
||||
COND(strmout->stride[2] > 0,
|
||||
A6XX_VPC_SO_STREAM_CNTL_BUF2_STREAM(1 + strmout->output[2].stream)) |
|
||||
COND(strmout->stride[3] > 0,
|
||||
A6XX_VPC_SO_STREAM_CNTL_BUF3_STREAM(1 + strmout->output[3].stream)));
|
||||
OUT_RING(ring, REG_A6XX_VPC_SO_BUFFER_STRIDE(0));
|
||||
OUT_RING(ring, strmout->stride[0]);
|
||||
OUT_RING(ring, REG_A6XX_VPC_SO_BUFFER_STRIDE(1));
|
||||
@@ -281,7 +289,7 @@ setup_stream_out(struct fd_context *ctx, struct fd6_program_state *state,
|
||||
first = false;
|
||||
}
|
||||
|
||||
if (ctx->screen->info->a6xx.tess_use_shared) {
|
||||
if (emit_pc_so_stream_cntl) {
|
||||
/* Possibly not tess_use_shared related, but the combination of
|
||||
* tess + xfb fails some tests if we don't emit this.
|
||||
*/
|
||||
|
||||
@@ -161,9 +161,13 @@ copy_stream_out(struct ir3_stream_output_info *i,
|
||||
STATIC_ASSERT(ARRAY_SIZE(i->stride) == ARRAY_SIZE(p->stride));
|
||||
STATIC_ASSERT(ARRAY_SIZE(i->output) == ARRAY_SIZE(p->output));
|
||||
|
||||
i->streams_written = 0;
|
||||
i->num_outputs = p->num_outputs;
|
||||
for (int n = 0; n < ARRAY_SIZE(i->stride); n++)
|
||||
for (int n = 0; n < ARRAY_SIZE(i->stride); n++) {
|
||||
i->stride[n] = p->stride[n];
|
||||
if (p->stride[n])
|
||||
i->streams_written |= BIT(n);
|
||||
}
|
||||
|
||||
for (int n = 0; n < ARRAY_SIZE(i->output); n++) {
|
||||
i->output[n].register_index = p->output[n].register_index;
|
||||
|
||||
Reference in New Issue
Block a user