nir/lower_two_sided_color: fix for lowered IO
1-bit input loads are illegal in NIR. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32173>
This commit is contained in:
@@ -164,7 +164,9 @@ nir_lower_two_sided_color_instr(nir_builder *b, nir_instr *instr, void *data)
|
||||
else {
|
||||
if (b->shader->info.io_lowered) {
|
||||
nir_io_semantics sem = {.location = VARYING_SLOT_FACE, .num_slots = 1};
|
||||
face = nir_load_input(b, 1, 1, nir_imm_int(b, 0), .base = 0, .dest_type = nir_type_bool, .io_semantics = sem);
|
||||
face = nir_load_input(b, 1, 32, nir_imm_int(b, 0), .base = 0,
|
||||
.dest_type = nir_type_bool32, .io_semantics = sem);
|
||||
face = nir_b2b1(b, face);
|
||||
} else {
|
||||
nir_variable *var = nir_get_variable_with_location(b->shader, nir_var_shader_in,
|
||||
VARYING_SLOT_FACE, glsl_bool_type());
|
||||
|
||||
Reference in New Issue
Block a user