diff options
author | Kevin Rogovin <kevin.rogovin@intel.com> | 2015-06-17 13:29:55 +0300 |
---|---|---|
committer | Martin Peres <martin.peres@linux.intel.com> | 2015-06-17 14:39:03 +0300 |
commit | 41b6db225f42a5d81beec1b4455ec7b504e2416d (patch) | |
tree | 4bd655e55026963ca51443e615ca3a2c09ce3b7b /src/mesa/drivers/dri/i965/gen7_viewport_state.c | |
parent | 51f4b51151cb08988b5de466f3c2348876784cc5 (diff) | |
download | external_mesa3d-41b6db225f42a5d81beec1b4455ec7b504e2416d.zip external_mesa3d-41b6db225f42a5d81beec1b4455ec7b504e2416d.tar.gz external_mesa3d-41b6db225f42a5d81beec1b4455ec7b504e2416d.tar.bz2 |
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 <ian.d.romanick@intel.com>
Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen7_viewport_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_viewport_state.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_viewport_state.c b/src/mesa/drivers/dri/i965/gen7_viewport_state.c index eb59684..b655205 100644 --- a/src/mesa/drivers/dri/i965/gen7_viewport_state.c +++ b/src/mesa/drivers/dri/i965/gen7_viewport_state.c @@ -26,6 +26,7 @@ #include "brw_defines.h" #include "intel_batchbuffer.h" #include "main/fbobject.h" +#include "main/framebuffer.h" #include "main/viewport.h" static void @@ -45,10 +46,10 @@ gen7_upload_sf_clip_viewport(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++) { |