From 4fdeeca192fad33e26b227eb29c764607374813e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 24 Dec 2024 13:50:33 -0500 Subject: [PATCH] st/mesa: switch st_nir_make_clearcolor_shader to IO intrinsics Reviewed-by: Alyssa Rosenzweig Part-of: --- src/mesa/state_tracker/st_nir_builtins.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/mesa/state_tracker/st_nir_builtins.c b/src/mesa/state_tracker/st_nir_builtins.c index 191ebdbe390..a3d88c2330d 100644 --- a/src/mesa/state_tracker/st_nir_builtins.c +++ b/src/mesa/state_tracker/st_nir_builtins.c @@ -158,17 +158,15 @@ st_nir_make_clearcolor_shader(struct st_context *st) b.shader->info.num_ubos = 1; b.shader->num_outputs = 1; b.shader->num_uniforms = 1; + b.shader->info.io_lowered = true; /* Read clear color from constant buffer */ nir_def *clear_color = nir_load_uniform(&b, 4, 32, nir_imm_int(&b,0), .range = 16, .dest_type = nir_type_float32); - nir_variable *color_out = nir_create_variable_with_location(b.shader, nir_var_shader_out, - FRAG_RESULT_COLOR, glsl_vec4_type()); - - /* Write out the color */ - nir_store_var(&b, color_out, clear_color, 0xf); + nir_store_output(&b, clear_color, nir_imm_int(&b, 0), + .io_semantics.location = FRAG_RESULT_COLOR); return st_nir_finish_builtin_shader(st, b.shader); }