Merge branch '7.8'
[mesa.git] / src / mesa / drivers / dri / intel / intel_span.c
index fb5c01bc4dc1a4aded76f9e28de5f63e4072f02f..c1e15d1b0f299db27ff5d107f5cb23d72e5bfb13 100644 (file)
@@ -48,11 +48,11 @@ intel_set_span_functions(struct intel_context *intel,
 
 #define LOCAL_VARS                                                     \
    struct intel_renderbuffer *irb = intel_renderbuffer(rb);            \
-   const GLint yScale = ctx->DrawBuffer->Name ? 1 : -1;                        \
-   const GLint yBias = ctx->DrawBuffer->Name ? 0 : irb->Base.Height - 1;\
+   const GLint yScale = rb->Name ? 1 : -1;                             \
+   const GLint yBias = rb->Name ? 0 : rb->Height - 1;                  \
    int minx = 0, miny = 0;                                             \
-   int maxx = ctx->DrawBuffer->Width;                                  \
-   int maxy = ctx->DrawBuffer->Height;                                 \
+   int maxx = rb->Width;                                               \
+   int maxy = rb->Height;                                              \
    int pitch = irb->region->pitch * irb->region->cpp;                  \
    void *buf = irb->region->buffer->virtual;                           \
    GLuint p;                                                           \
@@ -108,11 +108,11 @@ intel_set_span_functions(struct intel_context *intel,
 
 #define LOCAL_DEPTH_VARS                                               \
    struct intel_renderbuffer *irb = intel_renderbuffer(rb);            \
-   const GLint yScale = ctx->DrawBuffer->Name ? 1 : -1;                        \
-   const GLint yBias = ctx->DrawBuffer->Name ? 0 : irb->Base.Height - 1;\
+   const GLint yScale = rb->Name ? 1 : -1;                             \
+   const GLint yBias = rb->Name ? 0 : rb->Height - 1;                  \
    int minx = 0, miny = 0;                                             \
-   int maxx = ctx->DrawBuffer->Width;                                  \
-   int maxy = ctx->DrawBuffer->Height;                                 \
+   int maxx = rb->Width;                                               \
+   int maxy = rb->Height;                                              \
    int pitch = irb->region->pitch * irb->region->cpp;                  \
    void *buf = irb->region->buffer->virtual;                           \
    (void)buf; (void)pitch; /* unused for non-gttmap. */                        \
@@ -134,7 +134,7 @@ intel_set_span_functions(struct intel_context *intel,
    (*(uint32_t *)(irb->region->buffer->virtual + NO_TILE(_x, _y)) = d)
 #define READ_DEPTH(d, _x, _y) \
    d = *(uint32_t *)(irb->region->buffer->virtual + NO_TILE(_x, _y))
-#define TAG(x) intel_##x##_z24_x8
+#define TAG(x) intel_##x##_z24_s8
 #include "depthtmp.h"
 
 void
@@ -361,7 +361,7 @@ intel_set_span_functions(struct intel_context *intel,
       break;
    case MESA_FORMAT_X8_Z24:
    case MESA_FORMAT_S8_Z24:
-      intel_InitDepthPointers_z24_x8(rb);
+      intel_InitDepthPointers_z24_s8(rb);
       break;
    default:
       _mesa_problem(NULL,