gallium: add viewport swizzling state and cap
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4519>
This commit is contained in:
@@ -258,6 +258,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
|
|||||||
case PIPE_CAP_MAX_WINDOW_RECTANGLES: /* Enables EXT_window_rectangles */
|
case PIPE_CAP_MAX_WINDOW_RECTANGLES: /* Enables EXT_window_rectangles */
|
||||||
case PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED:
|
case PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED:
|
||||||
case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
|
case PIPE_CAP_VIEWPORT_SUBPIXEL_BITS:
|
||||||
|
case PIPE_CAP_VIEWPORT_SWIZZLE:
|
||||||
case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
|
case PIPE_CAP_MIXED_COLOR_DEPTH_BITS:
|
||||||
case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
|
case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
|
||||||
case PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS:
|
case PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS:
|
||||||
|
|||||||
@@ -573,6 +573,7 @@ The integer capabilities:
|
|||||||
* ``PIPE_CAP_PSIZ_CLAMPED``: Driver needs for the point size to be clamped. Additionally, the gl_PointSize has been modified and its value should be lowered for transform feedback, if needed. Defaults to false.
|
* ``PIPE_CAP_PSIZ_CLAMPED``: Driver needs for the point size to be clamped. Additionally, the gl_PointSize has been modified and its value should be lowered for transform feedback, if needed. Defaults to false.
|
||||||
* ``PIPE_CAP_DRAW_INFO_START_WITH_USER_INDICES``: pipe_draw_info::start can be non-zero with user indices.
|
* ``PIPE_CAP_DRAW_INFO_START_WITH_USER_INDICES``: pipe_draw_info::start can be non-zero with user indices.
|
||||||
* ``PIPE_CAP_GL_BEGIN_END_BUFFER_SIZE``: Buffer size used to upload vertices for glBegin/glEnd.
|
* ``PIPE_CAP_GL_BEGIN_END_BUFFER_SIZE``: Buffer size used to upload vertices for glBegin/glEnd.
|
||||||
|
* ``PIPE_CAP_VIEWPORT_SWIZZLE``: Whether pipe_viewport_state::swizzle can be used to specify pre-clipping swizzling of coordinates (see GL_NV_viewport_swizzle).
|
||||||
|
|
||||||
.. _pipe_capf:
|
.. _pipe_capf:
|
||||||
|
|
||||||
|
|||||||
@@ -626,6 +626,20 @@ enum pipe_swizzle {
|
|||||||
PIPE_SWIZZLE_MAX, /**< Number of enums counter (must be last) */
|
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
|
#define PIPE_TIMEOUT_INFINITE 0xffffffffffffffffull
|
||||||
|
|
||||||
|
|
||||||
@@ -920,6 +934,7 @@ enum pipe_cap
|
|||||||
PIPE_CAP_PSIZ_CLAMPED,
|
PIPE_CAP_PSIZ_CLAMPED,
|
||||||
PIPE_CAP_DRAW_INFO_START_WITH_USER_INDICES,
|
PIPE_CAP_DRAW_INFO_START_WITH_USER_INDICES,
|
||||||
PIPE_CAP_GL_BEGIN_END_BUFFER_SIZE,
|
PIPE_CAP_GL_BEGIN_END_BUFFER_SIZE,
|
||||||
|
PIPE_CAP_VIEWPORT_SWIZZLE,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -213,6 +213,10 @@ struct pipe_viewport_state
|
|||||||
{
|
{
|
||||||
float scale[3];
|
float scale[3];
|
||||||
float translate[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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user