diff options
author | Kevin Rogovin <[email protected]> | 2015-06-17 13:29:55 +0300 |
---|---|---|
committer | Martin Peres <[email protected]> | 2015-06-17 14:39:03 +0300 |
commit | 41b6db225f42a5d81beec1b4455ec7b504e2416d (patch) | |
tree | 4bd655e55026963ca51443e615ca3a2c09ce3b7b /src/mesa/drivers/dri/i965/gen6_viewport_state.c | |
parent | 51f4b51151cb08988b5de466f3c2348876784cc5 (diff) |
i965: Use _mesa_geometric_ functions appropriately
Change references to gl_framebuffer::Width, Height, MaxNumLayers
and Visual::samples to use the _mesa_geometry_ convenience functions
for those places where the geometry of the gl_framebuffer is needed
(in contrast to the geometry of the intersection of the attachments
of the gl_framebuffer).
This patch is to pave the way to enable GL_ARB_framebuffer_no_attachments
on Gen7 and higher in i965.
Reviewed-by: Ian Romanick <[email protected]>
Signed-off-by: Kevin Rogovin <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_viewport_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_viewport_state.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_viewport_state.c b/src/mesa/drivers/dri/i965/gen6_viewport_state.c index 2fb0182c56e..7c8d8849f4e 100644 --- a/src/mesa/drivers/dri/i965/gen6_viewport_state.c +++ b/src/mesa/drivers/dri/i965/gen6_viewport_state.c @@ -30,6 +30,7 @@ #include "brw_defines.h" #include "intel_batchbuffer.h" #include "main/fbobject.h" +#include "main/framebuffer.h" #include "main/viewport.h" /* The clip VP defines the guardband region where expensive clipping is skipped @@ -93,10 +94,10 @@ gen6_upload_sf_vp(struct brw_context *brw) /* _NEW_BUFFERS */ if (render_to_fbo) { y_scale = 1.0; - y_bias = 0; + y_bias = 0.0; } else { y_scale = -1.0; - y_bias = ctx->DrawBuffer->Height; + y_bias = (float)_mesa_geometric_height(ctx->DrawBuffer); } for (unsigned i = 0; i < ctx->Const.MaxViewports; i++) { |