diff options
Diffstat (limited to 'src/mesa/state_tracker/st_cb_drawtex.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawtex.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawtex.c b/src/mesa/state_tracker/st_cb_drawtex.c index a792629..e2af235 100644 --- a/src/mesa/state_tracker/st_cb_drawtex.c +++ b/src/mesa/state_tracker/st_cb_drawtex.c @@ -16,6 +16,7 @@ #include "main/image.h" #include "main/macros.h" #include "main/teximage.h" +#include "main/framebuffer.h" #include "program/program.h" #include "program/prog_print.h" @@ -166,8 +167,8 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, /* positions (in clip coords) */ { const struct gl_framebuffer *fb = ctx->DrawBuffer; - const GLfloat fb_width = (GLfloat)fb->Width; - const GLfloat fb_height = (GLfloat)fb->Height; + const GLfloat fb_width = (GLfloat)_mesa_geometric_width(fb); + const GLfloat fb_height = (GLfloat)_mesa_geometric_height(fb); const GLfloat clip_x0 = (GLfloat)(x0 / fb_width * 2.0 - 1.0); const GLfloat clip_y0 = (GLfloat)(y0 / fb_height * 2.0 - 1.0); @@ -262,8 +263,8 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, { const struct gl_framebuffer *fb = ctx->DrawBuffer; const GLboolean invert = (st_fb_orientation(fb) == Y_0_TOP); - const GLfloat width = (GLfloat)fb->Width; - const GLfloat height = (GLfloat)fb->Height; + const GLfloat width = (GLfloat)_mesa_geometric_width(fb); + const GLfloat height = (GLfloat)_mesa_geometric_height(fb); struct pipe_viewport_state vp; vp.scale[0] = 0.5f * width; vp.scale[1] = height * (invert ? -0.5f : 0.5f); |