iris: add struct iris_scissor_state because pipe_scissor_state will be changed

to use 32-bit integer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38587>
This commit is contained in:
Marek Olšák 2025-12-03 15:24:37 -05:00 committed by Marge Bot
parent 5c63446b94
commit 193e494e6a
2 changed files with 8 additions and 4 deletions

View file

@ -832,6 +832,10 @@ enum iris_context_priority {
IRIS_CONTEXT_HIGH_PRIORITY
};
struct iris_scissor_state {
uint16_t minx, miny, maxx, maxy;
};
/**
* The API context (derived from pipe_context).
*
@ -1005,7 +1009,7 @@ struct iris_context {
struct pipe_blend_color blend_color;
struct pipe_poly_stipple poly_stipple;
struct pipe_viewport_state viewports[IRIS_MAX_VIEWPORTS];
struct pipe_scissor_state scissors[IRIS_MAX_VIEWPORTS];
struct iris_scissor_state scissors[IRIS_MAX_VIEWPORTS];
struct pipe_stencil_ref stencil_ref;
PIPE_FB_SURFACES; //STOP USING THIS
struct pipe_framebuffer_state framebuffer;

View file

@ -3726,11 +3726,11 @@ iris_set_scissor_states(struct pipe_context *ctx,
* a min > max scissor inside the bounds, which produces the expected
* no rendering.
*/
ice->state.scissors[start_slot + i] = (struct pipe_scissor_state) {
ice->state.scissors[start_slot + i] = (struct iris_scissor_state) {
.minx = 1, .maxx = 0, .miny = 1, .maxy = 0,
};
} else {
ice->state.scissors[start_slot + i] = (struct pipe_scissor_state) {
ice->state.scissors[start_slot + i] = (struct iris_scissor_state) {
.minx = rects[i].minx, .miny = rects[i].miny,
.maxx = rects[i].maxx - 1, .maxy = rects[i].maxy - 1,
};
@ -10784,7 +10784,7 @@ genX(init_state)(struct iris_context *ice)
/* Default all scissor rectangles to be empty regions. */
for (int i = 0; i < IRIS_MAX_VIEWPORTS; i++) {
ice->state.scissors[i] = (struct pipe_scissor_state) {
ice->state.scissors[i] = (struct iris_scissor_state) {
.minx = 1, .maxx = 0, .miny = 1, .maxy = 0,
};
}