aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-11-06 20:18:23 -0500
committerMarek Olšák <[email protected]>2019-11-27 19:28:30 -0500
commit268e42e4f8be8bc0560538808bbe5df2612d2377 (patch)
tree334eaf5f98d3c858c55bd12d9b3e34e93b8a8fc1 /src/gallium/drivers/radeonsi
parent59daac686de0dd933fa8551a316d8d06865c90ec (diff)
radeonsi/nir: don't rely on data.patch for tess factors
GLCTS SPIR-V tests have this issue. Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index b1ab398ba71..2be14857334 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -1341,7 +1341,6 @@ static void si_nir_store_output_tcs(struct ac_shader_abi *abi,
struct si_shader_context *ctx = si_shader_context_from_abi(abi);
struct tgsi_shader_info *info = &ctx->shader->selector->info;
const unsigned component = var->data.location_frac;
- const bool is_patch = var->data.patch;
unsigned driver_location = var->data.driver_location;
LLVMValueRef dw_addr, stride;
LLVMValueRef buffer, base, addr;
@@ -1357,6 +1356,10 @@ static void si_nir_store_output_tcs(struct ac_shader_abi *abi,
if (!param_index)
param_index = LLVMConstInt(ctx->i32, const_index, 0);
+ const bool is_patch = var->data.patch ||
+ var->data.location == VARYING_SLOT_TESS_LEVEL_INNER ||
+ var->data.location == VARYING_SLOT_TESS_LEVEL_OUTER;
+
assert((name == TGSI_SEMANTIC_PATCH ||
name == TGSI_SEMANTIC_TESSINNER ||
name == TGSI_SEMANTIC_TESSOUTER) == is_patch);