r600: Disable SB when INTERP_SAMPLE is used.
authorEmma Anholt <emma@anholt.net>
Thu, 6 Jan 2022 17:58:46 +0000 (09:58 -0800)
committerEmma Anholt <emma@anholt.net>
Mon, 28 Mar 2022 17:54:46 +0000 (10:54 -0700)
Avoids an assertion failure in the SB scheduler.

Cc: mesa-stable
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14429>

src/gallium/drivers/r600/ci/r600-turks-fails.txt
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/r600/r600_shader.h

index f0b0079cf3b8e9c76875245da72d12e172f38555..937c7d2d9887cc80dd9bea4305eef340d1a67f45 100644 (file)
@@ -552,17 +552,6 @@ dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.a
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.at_sample_id.singlesample_rbo,Fail
 dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.at_sample_id.singlesample_texture,Fail
 
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.centroid_qualified.multisample_rbo_8,Crash
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.centroid_qualified.multisample_texture_8,Crash
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.dynamic_sample_number.multisample_rbo_4,Crash
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.dynamic_sample_number.multisample_rbo_8,Crash
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.dynamic_sample_number.multisample_texture_4,Crash
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.dynamic_sample_number.multisample_texture_8,Crash
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.static_sample_number.multisample_rbo_4,Crash
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.static_sample_number.multisample_rbo_8,Crash
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.static_sample_number.multisample_texture_4,Crash
-dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.static_sample_number.multisample_texture_8,Crash
-
 dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.dynamically_uniform.geometry.isampler2d,Crash
 dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.dynamically_uniform.geometry.isampler2darray,Crash
 dEQP-GLES31.functional.shaders.opaque_type_indexing.sampler.dynamically_uniform.geometry.isampler3d,Crash
index cac6ba0373b3d31a5c2a6f7851166efbd488cab4..dad366cda5bfc2d642589ae36cf3b10e29ce1e37 100644 (file)
@@ -264,6 +264,9 @@ int r600_pipe_shader_create(struct pipe_context *ctx,
         */
        use_sb &= !(shader->shader.indirect_files & (1 << TGSI_FILE_TEMPORARY));
 
+       /* sb has scheduling assertion fails with interpolate_at. */
+       use_sb &= !shader->shader.uses_interpolate_at_sample;
+
        /* Check if the bytecode has already been built. */
        if (!shader->shader.bc.bytecode) {
                r = r600_bytecode_build(&shader->shader.bc);
@@ -3467,6 +3470,7 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
        shader->uses_doubles = ctx.info.uses_doubles;
        shader->uses_atomics = ctx.info.file_mask[TGSI_FILE_HW_ATOMIC];
        shader->num_loops = ctx.info.opcode_count[TGSI_OPCODE_BGNLOOP];
+       shader->uses_interpolate_at_sample = ctx.info.opcode_count[TGSI_OPCODE_INTERP_SAMPLE] != 0;
 
        shader->nsys_inputs = 0;
 
index 43c4beedb4ad81a6a64ea5562266d076107b4e5d..ba84a98d422a303bf8b4205b23788b9381bc1016 100644 (file)
@@ -122,6 +122,7 @@ struct r600_shader {
        boolean                 uses_atomics;
        boolean                 uses_images;
        boolean                 uses_helper_invocation;
+       boolean                 uses_interpolate_at_sample;
        uint8_t                 atomic_base;
        uint8_t                 rat_base;
        uint8_t                 image_size_const_offset;