mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
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 <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
9b8b3f7501
commit
de45da6a8c
3 changed files with 7 additions and 0 deletions
|
|
@ -2330,6 +2330,9 @@ vtn_handle_execution_mode(struct vtn_builder *b, struct vtn_value *entry_point,
|
|||
break;
|
||||
|
||||
case SpvExecutionModePixelCenterInteger:
|
||||
b->pixel_center_integer = true;
|
||||
break;
|
||||
|
||||
case SpvExecutionModeXfb:
|
||||
assert(!"Unhandled execution mode");
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -378,6 +378,7 @@ struct vtn_builder {
|
|||
const char *entry_point_name;
|
||||
struct vtn_value *entry_point;
|
||||
bool origin_upper_left;
|
||||
bool pixel_center_integer;
|
||||
|
||||
struct vtn_function *func;
|
||||
struct exec_list functions;
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue