aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-04-17 18:51:02 -0700
committerKenneth Graunke <[email protected]>2014-05-01 00:23:59 -0700
commit3b3c46656ef865f3479d7d365f247de35857058b (patch)
tree48f28381131915ce2e6899f83f8985be14e325bb /src
parent69fd0551661797d89fe339ea3310c9e735a651d5 (diff)
i965: Implement the create_raw_surface() hook on Broadwell.
Otherwise we crash when setting up atomic buffer objects. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77221 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/gen8_surface_state.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/gen8_surface_state.c b/src/mesa/drivers/dri/i965/gen8_surface_state.c
index 90ec21a5998..4db53597684 100644
--- a/src/mesa/drivers/dri/i965/gen8_surface_state.c
+++ b/src/mesa/drivers/dri/i965/gen8_surface_state.c
@@ -217,6 +217,22 @@ gen8_update_texture_surface(struct gl_context *ctx,
I915_GEM_DOMAIN_SAMPLER, 0);
}
+static void
+gen8_create_raw_surface(struct brw_context *brw, drm_intel_bo *bo,
+ uint32_t offset, uint32_t size,
+ uint32_t *out_offset, bool rw)
+{
+ gen8_emit_buffer_surface_state(brw,
+ out_offset,
+ bo,
+ offset,
+ BRW_SURFACEFORMAT_RAW,
+ size,
+ 1,
+ 0 /* mocs */,
+ true /* rw */);
+}
+
/**
* Create the constant buffer surface. Vertex/fragment shader constants will be
* read from this buffer with Data Port Read instructions/messages.
@@ -358,5 +374,6 @@ gen8_init_vtable_surface_functions(struct brw_context *brw)
brw->vtbl.update_renderbuffer_surface = gen8_update_renderbuffer_surface;
brw->vtbl.update_null_renderbuffer_surface =
gen8_update_null_renderbuffer_surface;
+ brw->vtbl.create_raw_surface = gen8_create_raw_surface;
brw->vtbl.emit_buffer_surface_state = gen8_emit_buffer_surface_state;
}