summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-05-23 00:34:38 -0400
committerMarek Olšák <[email protected]>2018-05-25 16:46:00 -0400
commit2f65c67043529f8f7fca8514f88251f935e61c2c (patch)
tree12636611aa7916641e6feec9fd7bfeb18bbfeac4 /src/gallium/drivers
parenta7d61c075366ebdc0b77267f5bf0dbd6102d6920 (diff)
radeonsi: fix passing gl_ClipVertex for GS and tess
Also add the fprintf call. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c5
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.h2
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c5
3 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 6734a1628f5..d2b9b73e039 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -233,9 +233,12 @@ unsigned si_shader_io_get_unique_index(unsigned semantic_name, unsigned index,
return SI_MAX_IO_GENERIC + 10 + index;
case TGSI_SEMANTIC_TEXCOORD:
assert(index < 8);
- STATIC_ASSERT(SI_MAX_IO_GENERIC + 12 + 8 <= 64);
+ STATIC_ASSERT(SI_MAX_IO_GENERIC + 12 + 8 <= 63);
return SI_MAX_IO_GENERIC + 12 + index;
+ case TGSI_SEMANTIC_CLIPVERTEX:
+ return 63;
default:
+ fprintf(stderr, "invalid semantic name = %u\n", semantic_name);
assert(!"invalid semantic name");
return 0;
}
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
index 555ca598d2c..9e8d5736259 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 44
+#define SI_MAX_IO_GENERIC 43
/* SGPR user data indices */
enum {
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 1f443667cd6..707bb4187ef 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1226,9 +1226,10 @@ static void si_shader_selector_key_hw_vs(struct si_context *sctx,
uint64_t outputs_written = vs->outputs_written_before_ps;
uint64_t inputs_read = 0;
- /* ignore POSITION, PSIZE */
+ /* Ignore outputs that are not passed from VS to PS. */
outputs_written &= ~((1ull << si_shader_io_get_unique_index(TGSI_SEMANTIC_POSITION, 0, true)) |
- (1ull << si_shader_io_get_unique_index(TGSI_SEMANTIC_PSIZE, 0, true)));
+ (1ull << si_shader_io_get_unique_index(TGSI_SEMANTIC_PSIZE, 0, true)) |
+ (1ull << si_shader_io_get_unique_index(TGSI_SEMANTIC_CLIPVERTEX, 0, true)));
if (!ps_disabled) {
inputs_read = ps->inputs_read;