mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
nvk: Free NAK shaders
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26181>
This commit is contained in:
parent
c4ee639ca0
commit
a65518b625
2 changed files with 7 additions and 1 deletions
|
|
@ -1304,7 +1304,7 @@ nvk_compile_nir_with_nak(struct nvk_physical_device *pdev,
|
|||
STATIC_ASSERT(sizeof(shader->hdr) == sizeof(bin->info.hdr));
|
||||
memcpy(shader->hdr, bin->info.hdr, sizeof(bin->info.hdr));
|
||||
|
||||
/* TODO: Free the nak_shader_bin */
|
||||
shader->nak = bin;
|
||||
shader->code_ptr = (void *)bin->code;
|
||||
shader->code_size = bin->code_size;
|
||||
|
||||
|
|
@ -1472,5 +1472,9 @@ nvk_shader_finish(struct nvk_device *dev, struct nvk_shader *shader)
|
|||
shader->upload_addr,
|
||||
shader->upload_size);
|
||||
}
|
||||
|
||||
if (shader->nak)
|
||||
nak_shader_bin_destroy(shader->nak);
|
||||
|
||||
free(shader->xfb);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "nir.h"
|
||||
#include "nouveau_bo.h"
|
||||
|
||||
struct nak_shader_bin;
|
||||
struct nvk_device;
|
||||
struct nvk_physical_device;
|
||||
struct nvk_pipeline_compilation_ctx;
|
||||
|
|
@ -39,6 +40,7 @@ struct nvk_transform_feedback_state {
|
|||
struct nvk_shader {
|
||||
gl_shader_stage stage;
|
||||
|
||||
struct nak_shader_bin *nak;
|
||||
uint8_t *code_ptr;
|
||||
uint32_t code_size;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue