From 7a974a645e8b5c6a9aca3cc935a5a95cd9f33af8 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 1 Nov 2013 17:37:10 -0700 Subject: i965: Unvirtualize brw_create_constant_surface; delete Gen7+ variant. Now that brw_create_constant_surface uses a virtual function internally, it doesn't need to be virtual itself. We can delete the Gen7+ variant and simplify things. Signed-off-by: Kenneth Graunke Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 27 ----------------------- 1 file changed, 27 deletions(-) (limited to 'src/mesa/drivers/dri/i965/gen7_wm_surface_state.c') diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c index 2a42e32..c52e12d 100644 --- a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c @@ -398,32 +398,6 @@ gen7_update_texture_surface(struct gl_context *ctx, } /** - * Create the constant buffer surface. Vertex/fragment shader constants will - * be read from this buffer with Data Port Read instructions/messages. - */ -static void -gen7_create_constant_surface(struct brw_context *brw, - drm_intel_bo *bo, - uint32_t offset, - uint32_t size, - uint32_t *out_offset, - bool dword_pitch) -{ - uint32_t stride = dword_pitch ? 4 : 16; - uint32_t elements = ALIGN(size, stride) / stride; - - gen7_emit_buffer_surface_state(brw, - out_offset, - bo, - offset, - BRW_SURFACEFORMAT_R32G32B32A32_FLOAT, - elements, - stride, - 0 /* mocs */, - false /* rw */); -} - -/** * Create a raw surface for untyped R/W access. */ static void @@ -613,7 +587,6 @@ gen7_init_vtable_surface_functions(struct brw_context *brw) brw->vtbl.update_renderbuffer_surface = gen7_update_renderbuffer_surface; brw->vtbl.update_null_renderbuffer_surface = gen7_update_null_renderbuffer_surface; - brw->vtbl.create_constant_surface = gen7_create_constant_surface; brw->vtbl.create_raw_surface = gen7_create_raw_surface; brw->vtbl.emit_buffer_surface_state = gen7_emit_buffer_surface_state; } -- cgit v1.1