From 76cf43c4f88d263d7973da14136210f7c5b198ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 6 Sep 2020 02:38:09 -0400 Subject: [PATCH] radeonsi: merge uses_persp_opcode_interp_sample/uses_linear_opcode_interp_sample Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_shader.h | 3 +-- src/gallium/drivers/radeonsi/si_shader_nir.c | 8 ++------ src/gallium/drivers/radeonsi/si_state_shaders.c | 3 +-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 59c1d76ddd1..65354761778 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -355,8 +355,7 @@ struct si_shader_info { bool uses_linear_center; bool uses_linear_centroid; bool uses_linear_sample; - bool uses_persp_opcode_interp_sample; - bool uses_linear_opcode_interp_sample; + bool uses_interp_at_sample; bool uses_instanceid; bool uses_drawid; bool uses_primid; diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c index 8873aa29a5e..ce05143e559 100644 --- a/src/gallium/drivers/radeonsi/si_shader_nir.c +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c @@ -397,9 +397,6 @@ static void scan_instruction(const struct nir_shader *nir, struct si_shader_info info->uses_linear_centroid = true; else info->uses_linear_center = true; - - if (intr->intrinsic == nir_intrinsic_load_barycentric_at_sample) - info->uses_linear_opcode_interp_sample = true; } else { if (intr->intrinsic == nir_intrinsic_load_barycentric_sample) info->uses_persp_sample = true; @@ -407,10 +404,9 @@ static void scan_instruction(const struct nir_shader *nir, struct si_shader_info info->uses_persp_centroid = true; else info->uses_persp_center = true; - - if (intr->intrinsic == nir_intrinsic_load_barycentric_at_sample) - info->uses_persp_opcode_interp_sample = true; } + if (intr->intrinsic == nir_intrinsic_load_barycentric_at_sample) + info->uses_interp_at_sample = true; break; } case nir_intrinsic_load_input: diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 4fbbcf48d98..400b0de6cc6 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -1980,8 +1980,7 @@ static inline void si_shader_selector_key(struct pipe_context *ctx, struct si_sh sel->info.uses_linear_sample > 1; - if (sel->info.uses_persp_opcode_interp_sample || - sel->info.uses_linear_opcode_interp_sample) + if (sel->info.uses_interp_at_sample) key->mono.u.ps.interpolate_at_sample_force_center = 1; } -- 2.30.2