diff options
Diffstat (limited to 'src/compiler/spirv')
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 6 | ||||
-rw-r--r-- | src/compiler/spirv/vtn_private.h | 2 | ||||
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 6 |
3 files changed, 4 insertions, 10 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 8c07542f832..f5511587be8 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -3785,7 +3785,8 @@ vtn_handle_execution_mode(struct vtn_builder *b, struct vtn_value *entry_point, switch(mode->exec_mode) { case SpvExecutionModeOriginUpperLeft: case SpvExecutionModeOriginLowerLeft: - b->origin_upper_left = + vtn_assert(b->shader->info.stage == MESA_SHADER_FRAGMENT); + b->shader->info.fs.origin_upper_left = (mode->exec_mode == SpvExecutionModeOriginUpperLeft); break; @@ -3908,7 +3909,8 @@ vtn_handle_execution_mode(struct vtn_builder *b, struct vtn_value *entry_point, break; case SpvExecutionModePixelCenterInteger: - b->pixel_center_integer = true; + vtn_assert(b->shader->info.stage == MESA_SHADER_FRAGMENT); + b->shader->info.fs.pixel_center_integer = true; break; case SpvExecutionModeXfb: diff --git a/src/compiler/spirv/vtn_private.h b/src/compiler/spirv/vtn_private.h index 63313034ba6..f3d54051885 100644 --- a/src/compiler/spirv/vtn_private.h +++ b/src/compiler/spirv/vtn_private.h @@ -601,8 +601,6 @@ struct vtn_builder { const char *entry_point_name; struct vtn_value *entry_point; struct vtn_value *workgroup_size_builtin; - bool origin_upper_left; - bool pixel_center_integer; bool variable_pointers; struct vtn_function *func; diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index f6b458b7e78..51152520bb6 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1448,12 +1448,6 @@ apply_var_decoration(struct vtn_builder *b, case SpvBuiltInCullDistance: var_data->compact = true; break; - case SpvBuiltInFragCoord: - var_data->pixel_center_integer = b->pixel_center_integer; - /* fallthrough */ - case SpvBuiltInSamplePosition: - var_data->origin_upper_left = b->origin_upper_left; - break; default: break; } |