diff options
author | Timothy Arceri <[email protected]> | 2018-03-19 22:23:55 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-03-20 14:29:53 +1100 |
commit | dfe2f198550b262186e2882d7e573f1f3759deb7 (patch) | |
tree | dd7c18930f0046c69438490cd16b99cd0744cd8c /src/mesa | |
parent | 632d5e97efa3d38155d290fa397af7a729de8682 (diff) |
st/nir: fix atomic lowering for gallium drivers
i965 and gallium handle the atomic buffer index differently. It was
just by luck that the single piglit test for this was passing.
For gallium we use the atomic binding so that we match the handling
in st_bind_atomics().
On radeonsi this fixes the CTS test:
KHR-GL43.shader_storage_buffer_object.advanced-write-fragment
It also fixes tressfx hair rendering in Tomb Raider.
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_link.cpp | 2 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp index b08b56a9353..274a738cbbf 100644 --- a/src/mesa/drivers/dri/i965/brw_link.cpp +++ b/src/mesa/drivers/dri/i965/brw_link.cpp @@ -299,7 +299,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg) brw_shader_gather_info(prog->nir, prog); NIR_PASS_V(prog->nir, nir_lower_samplers, shProg); - NIR_PASS_V(prog->nir, nir_lower_atomics, shProg); + NIR_PASS_V(prog->nir, nir_lower_atomics, shProg, false); NIR_PASS_V(prog->nir, nir_lower_atomics_to_ssbo, prog->nir->info.num_abos); diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 2eb2ece5b16..9bb99f30610 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -414,7 +414,7 @@ st_glsl_to_nir_post_opts(struct st_context *st, struct gl_program *prog, st_set_prog_affected_state_flags(prog); NIR_PASS_V(nir, st_nir_lower_builtin); - NIR_PASS_V(nir, nir_lower_atomics, shader_program); + NIR_PASS_V(nir, nir_lower_atomics, shader_program, true); if (st->ctx->_Shader->Flags & GLSL_DUMP) { _mesa_log("\n"); |