mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
iris: Fix the constant data address calculation
In536727c465, we switched iris to patching the constant data address into the shader but, thanks to my lack of understanding how iris works, I got the calculation wrong. I didn't realize, we needed to call iris_bo_offset_from_base_address to get the BO offset from the start of instruction state base address. Fixes:536727c465"iris: Patch constant data pointers into shaders" Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3596 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6992>
This commit is contained in:
parent
23ff2a0e63
commit
1b0fec444f
1 changed files with 2 additions and 1 deletions
|
|
@ -229,7 +229,8 @@ iris_upload_shader(struct iris_context *ice,
|
|||
&shader->map);
|
||||
memcpy(shader->map, assembly, prog_data->program_size);
|
||||
|
||||
uint64_t shader_data_addr = IRIS_MEMZONE_SHADER_START +
|
||||
struct iris_resource *res = (void *) shader->assembly.res;
|
||||
uint64_t shader_data_addr = res->bo->gtt_offset +
|
||||
shader->assembly.offset +
|
||||
prog_data->const_data_offset;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue