From a7d61c075366ebdc0b77267f5bf0dbd6102d6920 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 23 May 2018 00:02:10 -0400 Subject: radeonsi: fix color inputs/outputs for GS and tess MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GS is tested, tessellation is untested. Have outputs_written_before_ps for HW VS and outputs_written for other stages. The reason is that COLOR and BCOLOR alias for HW VS, which drives elimination of VS outputs based on PS inputs. Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_shader.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/radeonsi/si_shader.h') diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 94366f41204..555ca598d2c 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -152,7 +152,7 @@ struct si_context; /* Shader IO unique indices are supported for TGSI_SEMANTIC_GENERIC with an * index smaller than this. */ -#define SI_MAX_IO_GENERIC 46 +#define SI_MAX_IO_GENERIC 44 /* SGPR user data indices */ enum { @@ -393,6 +393,7 @@ struct si_shader_selector { /* CS parameters */ unsigned local_size; + uint64_t outputs_written_before_ps; /* "get_unique_index" bits */ uint64_t outputs_written; /* "get_unique_index" bits */ uint32_t patch_outputs_written; /* "get_unique_index_patch" bits */ @@ -668,7 +669,8 @@ int si_shader_create(struct si_screen *sscreen, struct si_compiler *compiler, struct pipe_debug_callback *debug); void si_shader_destroy(struct si_shader *shader); unsigned si_shader_io_get_unique_index_patch(unsigned semantic_name, unsigned index); -unsigned si_shader_io_get_unique_index(unsigned semantic_name, unsigned index); +unsigned si_shader_io_get_unique_index(unsigned semantic_name, unsigned index, + unsigned is_varying); int si_shader_binary_upload(struct si_screen *sscreen, struct si_shader *shader); void si_shader_dump(struct si_screen *sscreen, const struct si_shader *shader, struct pipe_debug_callback *debug, unsigned processor, -- cgit v1.2.3