mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 00:38:48 +02:00
r600: fix emit_ssbo_atomic_op when ssbo_image_offset is non-zero
The value read was incorrect.
This change was tested on palm, barts and cayman, it fixes all the variants
of the advanced-sso-simple test:
khr-gl4[56]/es_31_compatibility/shader_image_load_store/advanced-sso-simple: fail pass
khr-gles31/core/shader_image_load_store/advanced-sso-simple: fail pass
Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37225>
(cherry picked from commit 06da0e7310)
This commit is contained in:
parent
3445cb5577
commit
d4353d5def
2 changed files with 5 additions and 13 deletions
|
|
@ -4144,7 +4144,7 @@
|
|||
"description": "r600: fix emit_ssbo_atomic_op when ssbo_image_offset is non-zero",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -717,8 +717,7 @@ RatInstr::emit_ssbo_atomic_op(nir_intrinsic_instr *intr, Shader& shader)
|
|||
{
|
||||
auto& vf = shader.value_factory();
|
||||
auto [imageid, image_offset] = shader.evaluate_resource_offset(intr, 0);
|
||||
{
|
||||
}
|
||||
const unsigned res_id = imageid + shader.ssbo_image_offset();
|
||||
|
||||
bool read_result = !list_is_empty(&intr->def.uses);
|
||||
auto opcode = read_result ? get_rat_opcode(nir_intrinsic_atomic_op(intr))
|
||||
|
|
@ -750,15 +749,8 @@ RatInstr::emit_ssbo_atomic_op(nir_intrinsic_instr *intr, Shader& shader)
|
|||
|
||||
RegisterVec4 out_vec(coord, coord, coord, coord, pin_chgr);
|
||||
|
||||
auto atomic = new RatInstr(cf_mem_rat,
|
||||
opcode,
|
||||
data_vec4,
|
||||
out_vec,
|
||||
imageid + shader.ssbo_image_offset(),
|
||||
image_offset,
|
||||
1,
|
||||
0xf,
|
||||
0);
|
||||
auto atomic =
|
||||
new RatInstr(cf_mem_rat, opcode, data_vec4, out_vec, res_id, image_offset, 1, 0xf, 0);
|
||||
shader.emit_instruction(atomic);
|
||||
|
||||
atomic->set_ack();
|
||||
|
|
@ -775,7 +767,7 @@ RatInstr::emit_ssbo_atomic_op(nir_intrinsic_instr *intr, Shader& shader)
|
|||
fmt_32,
|
||||
vtx_nf_int,
|
||||
vtx_es_none,
|
||||
R600_IMAGE_IMMED_RESOURCE_OFFSET + imageid,
|
||||
R600_IMAGE_IMMED_RESOURCE_OFFSET + res_id,
|
||||
image_offset);
|
||||
fetch->set_mfc(15);
|
||||
fetch->set_fetch_flag(FetchInstr::srf_mode);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue