summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/glsl_to_nir.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-02-16 16:10:58 +1100
committerTimothy Arceri <[email protected]>2018-02-19 08:47:48 +1100
commit347038baa9e897aee32df9db99a099146f249f42 (patch)
tree29289df401b90a5ebdce462777c5c7fd0a9ef0b9 /src/compiler/glsl/glsl_to_nir.cpp
parentfe76fc11b1fb8856c753630665a9ab5512427c96 (diff)
glsl/nir: add pixel_center_integer to shader info
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_to_nir.cpp')
-rw-r--r--src/compiler/glsl/glsl_to_nir.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index 1a579f41cd3..7a9d15015e2 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -406,6 +406,11 @@ 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;