aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-07-18 12:54:48 -0700
committerPaul Berry <[email protected]>2012-07-26 10:48:36 -0700
commitc738ea1191cd1b5a0dc60b0e6d05fd918083e961 (patch)
treef91987757f43432ec049683086e424ffc0ff4ec1 /src/mesa/drivers/dri/i915
parent284ad9c3b29a6d6f0bade050ea9e949d67967983 (diff)
intel: Make more consistent use of _mesa_is_{user,winsys}_fbo()
A lot of code was still differentiating between between winsys and user fbos by testing the fbo's name against zero. This converts everything in the i915 and 965 drivers over to use _mesa_is_user_fbo() and _mesa_is_winsys_fbo(). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i830_vtbl.c3
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i915/i830_vtbl.c b/src/mesa/drivers/dri/i915/i830_vtbl.c
index 28e95d97cc3..6019852bf6c 100644
--- a/src/mesa/drivers/dri/i915/i830_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i830_vtbl.c
@@ -39,6 +39,7 @@
#include "swrast_setup/swrast_setup.h"
#include "main/renderbuffer.h"
#include "main/framebuffer.h"
+#include "main/fbobject.h"
#define FILE_DEBUG_FLAG DEBUG_STATE
@@ -769,7 +770,7 @@ i830_update_draw_buffer(struct intel_context *intel)
/* Get the intel_renderbuffer for the single colorbuffer we're drawing
* into.
*/
- if (fb->Name == 0) {
+ if (_mesa_is_winsys_fbo(fb)) {
/* drawing to window system buffer */
if (fb->_ColorDrawBufferIndexes[0] == BUFFER_FRONT_LEFT)
colorRegions[0] = intel_get_rb_region(fb, BUFFER_FRONT_LEFT);
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index cf67d743004..5954b24fe5a 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -38,6 +38,7 @@
#include "main/texobj.h"
#include "main/state.h"
#include "main/dd.h"
+#include "main/fbobject.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
@@ -503,7 +504,7 @@ intel_emit_fragcoord(struct intel_context *intel, intelVertexPtr v)
fragcoord[0] = vertex_position[0];
- if (fb->Name)
+ if (_mesa_is_user_fbo(fb))
fragcoord[1] = vertex_position[1];
else
fragcoord[1] = fb->Height - vertex_position[1];