From: Brian Paul Date: Thu, 29 Jan 2009 21:57:16 +0000 (-0700) Subject: intel: fix check for Y orientation in span functions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba3aadf354e197ab56adddc99c3b3335d7e6863e;p=mesa.git intel: fix check for Y orientation in span functions. --- diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c index c990caf3eb6..bdd2fd9e857 100644 --- a/src/mesa/drivers/dri/intel/intel_span.c +++ b/src/mesa/drivers/dri/intel/intel_span.c @@ -255,8 +255,8 @@ static uint32_t y_tile_swizzle(struct intel_renderbuffer *irb, #define LOCAL_VARS \ struct intel_context *intel = intel_context(ctx); \ struct intel_renderbuffer *irb = intel_renderbuffer(rb); \ - const GLint yScale = irb->RenderToTexture ? 1 : -1; \ - const GLint yBias = irb->RenderToTexture ? 0 : irb->Base.Height - 1; \ + const GLint yScale = ctx->DrawBuffer->Name ? 1 : -1; \ + const GLint yBias = ctx->DrawBuffer->Name ? 0 : irb->Base.Height - 1;\ unsigned int num_cliprects; \ struct drm_clip_rect *cliprects; \ int x_off, y_off; \ @@ -392,8 +392,8 @@ static uint32_t y_tile_swizzle(struct intel_renderbuffer *irb, #define LOCAL_DEPTH_VARS \ struct intel_context *intel = intel_context(ctx); \ struct intel_renderbuffer *irb = intel_renderbuffer(rb); \ - const GLint yScale = irb->RenderToTexture ? 1 : -1; \ - const GLint yBias = irb->RenderToTexture ? 0 : irb->Base.Height - 1; \ + const GLint yScale = ctx->DrawBuffer->Name ? 1 : -1; \ + const GLint yBias = ctx->DrawBuffer->Name ? 0 : irb->Base.Height - 1;\ unsigned int num_cliprects; \ struct drm_clip_rect *cliprects; \ int x_off, y_off; \