mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
st/mesa: fix incorrect sprite origin when drawing to FBO/texture
Need to take the draw buffer's up/down orientation into consideration when setting the sprite_coord_mode field. Fixes inverted sprites when drawing into an FBO.
This commit is contained in:
parent
427554211b
commit
0e8a5a8474
1 changed files with 2 additions and 1 deletions
|
|
@ -192,7 +192,8 @@ static void update_raster_state( struct st_context *st )
|
|||
raster->point_sprite = ctx->Point.PointSprite;
|
||||
for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) {
|
||||
if (ctx->Point.CoordReplace[i]) {
|
||||
if (ctx->Point.SpriteOrigin == GL_UPPER_LEFT)
|
||||
if ((ctx->Point.SpriteOrigin == GL_UPPER_LEFT) ^
|
||||
(st_fb_orientation(ctx->DrawBuffer) == Y_0_BOTTOM))
|
||||
raster->sprite_coord_mode[i] = PIPE_SPRITE_COORD_UPPER_LEFT;
|
||||
else
|
||||
raster->sprite_coord_mode[i] = PIPE_SPRITE_COORD_LOWER_LEFT;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue