[Mesa-dev] [PATCH 2/4] i965: Use the new emit_buffer_surface_state() vtable entry.

Kenneth Graunke kenneth at whitecape.org
Fri Nov 1 20:23:12 PDT 2013


This will allow us to combine the Gen4-6 and Gen7 variants of these
functions.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 5d43a0d..a605c16 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -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);
 }
 
 /**
-- 
1.8.3.2



More information about the mesa-dev mailing list