diff options
author | Francisco Jerez <[email protected]> | 2015-09-03 17:08:16 +0300 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2015-12-09 13:46:04 +0200 |
commit | 4841cab01a2a6d308c00b4039f1fb1a29e44ed74 (patch) | |
tree | 2ae2a4990adfd444035fa502f2a3e4fc433c52b2 /src | |
parent | 50c2713726f007b988502ed5e7073fae11409853 (diff) |
i965: Keep track of whether LRI is allowed in the context struct.
This stores the result of can_do_pipelined_register_writes() in the
context struct so we can find out later whether LRI can be used to
program the L3 configuration.
v2:
* Split change of gen check in can_do_pipelined_register_writes (jljusten)
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.h | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_extensions.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index abc6d564cf8..2fee6a7797f 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -866,6 +866,11 @@ struct brw_context bool use_resource_streamer; /** + * Whether LRI can be used to write register values from the batch buffer. + */ + bool can_do_pipelined_register_writes; + + /** * Some versions of Gen hardware don't do centroid interpolation correctly * on unlit pixels, causing incorrect values for derivatives near triangle * edges. Enabling this flag causes the fragment shader to use diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 8a1ec324e2c..2fde0740b47 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/dri/i965/intel_extensions.c @@ -320,6 +320,8 @@ intelInitExtensions(struct gl_context *ctx) } brw->predicate.supported = false; + brw->can_do_pipelined_register_writes = + can_do_pipelined_register_writes(brw); if (brw->gen >= 7) { ctx->Extensions.ARB_conservative_depth = true; @@ -336,7 +338,7 @@ intelInitExtensions(struct gl_context *ctx) ctx->Extensions.ARB_shader_storage_buffer_object = true; ctx->Extensions.EXT_shader_samples_identical = true; - if (can_do_pipelined_register_writes(brw)) { + if (brw->can_do_pipelined_register_writes) { ctx->Extensions.ARB_draw_indirect = true; ctx->Extensions.ARB_transform_feedback2 = true; ctx->Extensions.ARB_transform_feedback3 = true; |