nvk: Make shader_upload take an nvk_device
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
committed by
Marge Bot
parent
61a91914df
commit
0b179da344
@@ -103,7 +103,7 @@ nvk_compute_pipeline_create(struct nvk_device *device,
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail;
|
||||
|
||||
nvk_shader_upload(pdevice, &pipeline->base.shaders[MESA_SHADER_COMPUTE]);
|
||||
nvk_shader_upload(device, &pipeline->base.shaders[MESA_SHADER_COMPUTE]);
|
||||
gv100_compute_setup_launch_desc_template(pipeline->qmd_template, &pipeline->base.shaders[MESA_SHADER_COMPUTE]);
|
||||
*pPipeline = nvk_pipeline_to_handle(&pipeline->base);
|
||||
return VK_SUCCESS;
|
||||
|
||||
@@ -197,13 +197,14 @@ nvk_compile_nir(struct nvk_physical_device *device, nir_shader *nir,
|
||||
}
|
||||
|
||||
void
|
||||
nvk_shader_upload(struct nvk_physical_device *physical, struct nvk_shader *shader)
|
||||
nvk_shader_upload(struct nvk_device *dev, struct nvk_shader *shader)
|
||||
{
|
||||
void *ptr;
|
||||
/* TODO: The I-cache pre-fetches and we don't really know by how much. So
|
||||
* throw on a bunch just to be sure.
|
||||
*/
|
||||
shader->bo = nouveau_ws_bo_new(physical->dev, shader->code_size + 4096, 256,
|
||||
shader->bo = nouveau_ws_bo_new(nvk_device_physical(dev)->dev,
|
||||
shader->code_size + 4096, 256,
|
||||
NOUVEAU_WS_BO_LOCAL | NOUVEAU_WS_BO_MAP);
|
||||
|
||||
ptr = nouveau_ws_bo_map(shader->bo, NOUVEAU_WS_BO_WR);
|
||||
|
||||
@@ -55,5 +55,5 @@ nvk_compile_nir(struct nvk_physical_device *device, nir_shader *nir,
|
||||
struct nvk_shader *shader);
|
||||
|
||||
void
|
||||
nvk_shader_upload(struct nvk_physical_device *physical, struct nvk_shader *shader);
|
||||
nvk_shader_upload(struct nvk_device *dev, struct nvk_shader *shader);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user