diff options
author | Rob Clark <[email protected]> | 2019-05-07 06:38:01 -0700 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-05-07 07:26:00 -0700 |
commit | b15c46e6bf4cd375ae0b580bd1a0ec139e8dd3ef (patch) | |
tree | 13462a9ca26d8156ff1acd9b24af0508e79ae62e /src/freedreno/vulkan/tu_shader.c | |
parent | 5690f83bb533cd62747194f0029892e9dc662669 (diff) |
freedreno/ir3: move const_state to ir3_shader
For a6xx, we construct/emit a single VS const state used for both
binning pass and draw pass. So far we were mostly getting lucky that
there were not (obvious) mismatches between the const_state (like
different lowered immediates) between the binning and draw pass
VS ir3_shader_variant.
And I guess this situation will come up more as GS and tess is added
into the equation.
Since really everything about the const state is not specific to the
variant, move this. The main exception is lowered immediates, but these
are the last to appear in the layout, and it doesn't hurt for each new
shader variant to just append any immed's it lowers to the end of the
immediate state.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/freedreno/vulkan/tu_shader.c')
-rw-r--r-- | src/freedreno/vulkan/tu_shader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c index 62f8f91c7f3..8d6ccecdd9c 100644 --- a/src/freedreno/vulkan/tu_shader.c +++ b/src/freedreno/vulkan/tu_shader.c @@ -196,10 +196,10 @@ tu_shader_destroy(struct tu_device *dev, for (uint32_t i = 0; i < 1 + shader->has_binning_pass; i++) { if (shader->variants[i].ir) ir3_destroy(shader->variants[i].ir); - if (shader->variants[i].const_state.immediates) - free(shader->variants[i].const_state.immediates); } + if (shader->ir3_shader.const_state.immediates) + free(shader->ir3_shader.const_state.immediates); if (shader->binary) free(shader->binary); if (shader->binning_binary) |