summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_variables.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-05-18 11:06:08 -0700
committerKenneth Graunke <[email protected]>2016-05-20 14:44:22 -0700
commitde45da6a8c3091de400adc468682779abc989109 (patch)
tree22faf0247bcbe75e5d56282d682ef3b06cc04653 /src/compiler/spirv/vtn_variables.c
parent9b8b3f75018ac3d7ab9aa09df012b6d19aa6fae2 (diff)
spirv: Handle the PixelCenterInteger execution mode.
This isn't allowed by Vulkan, but might be useful someday for SPIR-V in OpenGL (if that ever becomes a thing). It's easy enough to hook up, and as precedent, we already do so for OriginLowerLeft. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r--src/compiler/spirv/vtn_variables.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index bbe1166aff0..0c7f0f76718 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1016,6 +1016,9 @@ var_decoration_cb(struct vtn_builder *b, struct vtn_value *val, int member,
if (builtin == SpvBuiltInFragCoord || builtin == SpvBuiltInSamplePosition)
nir_var->data.origin_upper_left = b->origin_upper_left;
+
+ if (builtin == SpvBuiltInFragCoord)
+ nir_var->data.pixel_center_integer = b->pixel_center_integer;
break;
}
case SpvDecorationRowMajor: