st/drawpixels: use normalized coords in samplers with lowered rects

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18614>
(cherry picked from commit a96151f64533e0d6c7134aafcc10f0cdf87227ac)
This commit is contained in:
Mike Blumenkrantz 2022-09-15 09:31:09 -04:00 committed by Dylan Baker
parent 66ab591a07
commit 26c82a7e7e
2 changed files with 3 additions and 2 deletions

View File

@ -4144,7 +4144,7 @@
"description": "st/drawpixels: use normalized coords in samplers with lowered rects",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View File

@ -747,7 +747,8 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
const unsigned fb_height = _mesa_geometric_height(ctx->DrawBuffer);
GLfloat x0, y0, x1, y1;
ASSERTED GLsizei maxSize;
boolean normalized = sv[0]->texture->target == PIPE_TEXTURE_2D;
boolean normalized = sv[0]->texture->target == PIPE_TEXTURE_2D ||
(sv[0]->texture->target == PIPE_TEXTURE_RECT && st->lower_rect_tex);
unsigned cso_state_mask;
assert(sv[0]->texture->target == st->internal_target);