diff options
author | Ilia Mirkin <[email protected]> | 2020-04-05 23:43:08 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2020-04-12 12:01:46 -0400 |
commit | 4137a79c2a7edb5f0caf0964ab748da7c279b61c (patch) | |
tree | 8993c288657c309a73cc74606bb01149860b3612 /src/gallium/include | |
parent | e2457bedd389c6799fe99b1e0d6ade36b763c6c3 (diff) |
gallium: add viewport swizzling state and cap
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4519>
Diffstat (limited to 'src/gallium/include')
-rw-r--r-- | src/gallium/include/pipe/p_defines.h | 15 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_state.h | 4 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 04388d317a3..5fb6fcf3ebd 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -626,6 +626,20 @@ enum pipe_swizzle { PIPE_SWIZZLE_MAX, /**< Number of enums counter (must be last) */ }; +/** + * Viewport swizzles + */ +enum pipe_viewport_swizzle { + PIPE_VIEWPORT_SWIZZLE_POSITIVE_X, + PIPE_VIEWPORT_SWIZZLE_NEGATIVE_X, + PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y, + PIPE_VIEWPORT_SWIZZLE_NEGATIVE_Y, + PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z, + PIPE_VIEWPORT_SWIZZLE_NEGATIVE_Z, + PIPE_VIEWPORT_SWIZZLE_POSITIVE_W, + PIPE_VIEWPORT_SWIZZLE_NEGATIVE_W, +}; + #define PIPE_TIMEOUT_INFINITE 0xffffffffffffffffull @@ -920,6 +934,7 @@ enum pipe_cap PIPE_CAP_PSIZ_CLAMPED, PIPE_CAP_DRAW_INFO_START_WITH_USER_INDICES, PIPE_CAP_GL_BEGIN_END_BUFFER_SIZE, + PIPE_CAP_VIEWPORT_SWIZZLE, }; /** diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index b0d8eaed2fa..736649acd2f 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -213,6 +213,10 @@ struct pipe_viewport_state { float scale[3]; float translate[3]; + enum pipe_viewport_swizzle swizzle_x:3; + enum pipe_viewport_swizzle swizzle_y:3; + enum pipe_viewport_swizzle swizzle_z:3; + enum pipe_viewport_swizzle swizzle_w:3; }; |