i965: Use the new emit_buffer_surface_state() vtable entry.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 2 Nov 2013 00:33:42 +0000 (17:33 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 6 Nov 2013 01:59:50 +0000 (17:59 -0800)
This will allow us to combine the Gen4-6 and Gen7 variants of these
functions.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_wm_surface_state.c

index 5d43a0d47f957cd5adc2e528f351318ddcc86d07..a605c16ca813b94a39dc755c8a3c05b63d84585a 100644 (file)
@@ -251,13 +251,13 @@ brw_update_buffer_texture_surface(struct gl_context *ctx,
                    _mesa_get_format_name(format));
    }
 
-   gen4_emit_buffer_surface_state(brw, surf_offset, bo,
-                                  tObj->BufferOffset,
-                                  brw_format,
-                                  size / texel_size,
-                                  texel_size,
-                                  0,
-                                  false);
+   brw->vtbl.emit_buffer_surface_state(brw, surf_offset, bo,
+                                       tObj->BufferOffset,
+                                       brw_format,
+                                       size / texel_size,
+                                       texel_size,
+                                       0, /* mocs */
+                                       false /* rw */);
 }
 
 static void
@@ -332,9 +332,9 @@ brw_create_constant_surface(struct brw_context *brw,
    uint32_t stride = dword_pitch ? 4 : 16;
    uint32_t elements = ALIGN(size, stride) / stride;
 
-   gen4_emit_buffer_surface_state(brw, out_offset, bo, offset,
-                                  BRW_SURFACEFORMAT_R32G32B32A32_FLOAT,
-                                  elements, stride, 0, false);
+   brw->vtbl.emit_buffer_surface_state(brw, out_offset, bo, offset,
+                                       BRW_SURFACEFORMAT_R32G32B32A32_FLOAT,
+                                       elements, stride, 0, false);
 }
 
 /**