summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen6_viewport_state.c
diff options
context:
space:
mode:
authorKevin Rogovin <kevin.rogovin@intel.com>2015-06-17 13:29:55 +0300
committerMartin Peres <martin.peres@linux.intel.com>2015-06-17 14:39:03 +0300
commit41b6db225f42a5d81beec1b4455ec7b504e2416d (patch)
tree4bd655e55026963ca51443e615ca3a2c09ce3b7b /src/mesa/drivers/dri/i965/gen6_viewport_state.c
parent51f4b51151cb08988b5de466f3c2348876784cc5 (diff)
downloadexternal_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/gen6_viewport_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_viewport_state.c5
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 2fb0182..7c8d884 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++) {