From 991a95a352996cac75aed1c4cca7cea78a425f40 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Thu, 6 Jan 2022 09:58:46 -0800 Subject: [PATCH] r600: Disable SB when INTERP_SAMPLE is used. Avoids an assertion failure in the SB scheduler. Cc: mesa-stable Reviewed-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/ci/r600-turks-fails.txt | 11 ----------- src/gallium/drivers/r600/r600_shader.c | 4 ++++ src/gallium/drivers/r600/r600_shader.h | 1 + 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/gallium/drivers/r600/ci/r600-turks-fails.txt b/src/gallium/drivers/r600/ci/r600-turks-fails.txt index f0b0079cf3b..937c7d2d988 100644 --- a/src/gallium/drivers/r600/ci/r600-turks-fails.txt +++ b/src/gallium/drivers/r600/ci/r600-turks-fails.txt @@ -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 diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index cac6ba0373b..dad366cda5b 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -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; diff --git a/src/gallium/drivers/r600/r600_shader.h b/src/gallium/drivers/r600/r600_shader.h index 43c4beedb4a..ba84a98d422 100644 --- a/src/gallium/drivers/r600/r600_shader.h +++ b/src/gallium/drivers/r600/r600_shader.h @@ -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; -- 2.34.1