diff options
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 5 | ||||
-rw-r--r-- | src/compiler/nir/nir_lower_system_values.c | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index d2db0f95aca..90aa21f3149 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -389,11 +389,6 @@ nir_visitor::visit(ir_variable *ir) var->data.pixel_center_integer = ir->data.pixel_center_integer; var->data.location_frac = ir->data.location_frac; - if (var->data.pixel_center_integer) { - assert(shader->info.stage == MESA_SHADER_FRAGMENT); - shader->info.fs.pixel_center_integer = true; - } - switch (ir->data.depth_layout) { case ir_depth_layout_none: var->data.depth_layout = nir_depth_layout_none; diff --git a/src/compiler/nir/nir_lower_system_values.c b/src/compiler/nir/nir_lower_system_values.c index 68b0ea89c8d..7c1aa5fa801 100644 --- a/src/compiler/nir/nir_lower_system_values.c +++ b/src/compiler/nir/nir_lower_system_values.c @@ -254,6 +254,12 @@ convert_block(nir_block *block, nir_builder *b) break; } + case SYSTEM_VALUE_FRAG_COORD: + assert(b->shader->info.stage == MESA_SHADER_FRAGMENT); + b->shader->info.fs.pixel_center_integer = + var->data.pixel_center_integer; + break; + default: break; } |