radeonsi: store the shader gpu adress in si_shader
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18865>
This commit is contained in:
committed by
Marge Bot
parent
619f009ff2
commit
6189af1ddb
@@ -951,6 +951,7 @@ bool si_shader_binary_upload(struct si_screen *sscreen, struct si_shader *shader
|
||||
|
||||
sscreen->ws->buffer_unmap(sscreen->ws, shader->bo->buf);
|
||||
ac_rtld_close(&binary);
|
||||
shader->gpu_address = u.rx_va;
|
||||
|
||||
return size >= 0;
|
||||
}
|
||||
|
||||
@@ -845,6 +845,10 @@ struct si_shader {
|
||||
struct si_shader *gs_copy_shader;
|
||||
|
||||
struct si_resource *bo;
|
||||
/* gpu_address should be bo->gpu_address except if SQTT is
|
||||
* in use.
|
||||
*/
|
||||
uint64_t gpu_address;
|
||||
struct si_resource *scratch_bo;
|
||||
union si_shader_key key;
|
||||
struct util_queue_fence ready;
|
||||
|
||||
@@ -374,6 +374,8 @@ static bool si_update_shaders(struct si_context *sctx)
|
||||
|
||||
pipeline->offset[i] = offset;
|
||||
|
||||
shader->gpu_address = u.rx_va;
|
||||
|
||||
offset += align(size, 256);
|
||||
|
||||
struct si_pm4_state *pm4 = &shader->pm4;
|
||||
|
||||
Reference in New Issue
Block a user