mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-29 22:30:24 +01:00
st/glx: use PIPE_TEXTURE_RECT if appropriate
This commit is contained in:
parent
4a5acc0ec7
commit
d34f6e9db1
1 changed files with 6 additions and 1 deletions
|
|
@ -38,6 +38,7 @@ struct xmesa_st_framebuffer {
|
|||
struct pipe_screen *screen;
|
||||
|
||||
struct st_visual stvis;
|
||||
enum pipe_texture_target target;
|
||||
|
||||
unsigned texture_width, texture_height, texture_mask;
|
||||
struct pipe_resource *textures[ST_ATTACHMENT_COUNT];
|
||||
|
|
@ -139,7 +140,7 @@ xmesa_st_framebuffer_validate_textures(struct st_framebuffer_iface *stfbi,
|
|||
}
|
||||
|
||||
memset(&templ, 0, sizeof(templ));
|
||||
templ.target = PIPE_TEXTURE_2D;
|
||||
templ.target = xstfb->target;
|
||||
templ.width0 = width;
|
||||
templ.height0 = height;
|
||||
templ.depth0 = 1;
|
||||
|
|
@ -279,6 +280,10 @@ xmesa_create_st_framebuffer(XMesaDisplay xmdpy, XMesaBuffer b)
|
|||
xstfb->buffer = b;
|
||||
xstfb->screen = xmdpy->screen;
|
||||
xstfb->stvis = b->xm_visual->stvis;
|
||||
if(xstfb->screen->get_param(xstfb->screen, PIPE_CAP_NPOT_TEXTURES))
|
||||
xstfb->target = PIPE_TEXTURE_2D;
|
||||
else
|
||||
xstfb->target = PIPE_TEXTURE_RECT;
|
||||
|
||||
stfbi->visual = &xstfb->stvis;
|
||||
stfbi->flush_front = xmesa_st_framebuffer_flush_front;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue