i965: Always set tiling for depth buffer on sandybridge
[mesa.git] / src / mesa / drivers / dri / common / depthtmp.h
index 1875d157b4c36cdd79268c31e7c4275f17675c94..fd2dab3b42238b6a55c107b34e16db373582b207 100644 (file)
@@ -29,7 +29,7 @@ static void TAG(WriteDepthSpan)( GLcontext *ctx,
 {
    HW_WRITE_LOCK()
       {
-         const GLuint *depth = (const GLuint *) values;
+         const VALUE_TYPE *depth = (const VALUE_TYPE *) values;
         GLint x1;
         GLint n1;
         LOCAL_DEPTH_VARS;
@@ -134,7 +134,7 @@ static void TAG(WriteDepthPixels)( GLcontext *ctx,
 {
    HW_WRITE_LOCK()
       {
-         const GLuint *depth = (const GLuint *) values;
+         const VALUE_TYPE *depth = (const VALUE_TYPE *) values;
         GLuint i;
         LOCAL_DEPTH_VARS;
 
@@ -180,7 +180,7 @@ static void TAG(ReadDepthSpan)( GLcontext *ctx,
 {
    HW_READ_LOCK()
       {
-         GLuint *depth = (GLuint *) values;
+         VALUE_TYPE *depth = (VALUE_TYPE *) values;
         GLint x1, n1;
         LOCAL_DEPTH_VARS;
 
@@ -215,7 +215,7 @@ static void TAG(ReadDepthPixels)( GLcontext *ctx,
 {
    HW_READ_LOCK()
       {
-         GLuint *depth = (GLuint *) values;
+         VALUE_TYPE *depth = (VALUE_TYPE *) values;
         GLuint i;
         LOCAL_DEPTH_VARS;
 
@@ -241,6 +241,22 @@ static void TAG(ReadDepthPixels)( GLcontext *ctx,
 }
 
 
+/**
+ * Initialize the given renderbuffer's span routines to point to
+ * the depth/z functions we generated above.
+ */
+static void TAG(InitDepthPointers)(struct gl_renderbuffer *rb)
+{
+   rb->GetRow = TAG(ReadDepthSpan);
+   rb->GetValues = TAG(ReadDepthPixels);
+   rb->PutRow = TAG(WriteDepthSpan);
+   rb->PutRowRGB = NULL;
+   rb->PutMonoRow = TAG(WriteMonoDepthSpan);
+   rb->PutValues = TAG(WriteDepthPixels);
+   rb->PutMonoValues = NULL;
+}
+
+
 #if HAVE_HW_DEPTH_SPANS
 #undef WRITE_DEPTH_SPAN
 #undef WRITE_DEPTH_PIXELS
@@ -251,3 +267,4 @@ static void TAG(ReadDepthPixels)( GLcontext *ctx,
 #undef READ_DEPTH
 #endif
 #undef TAG
+#undef VALUE_TYPE