diff options
author | Caio Marcelo de Oliveira Filho <[email protected]> | 2020-03-03 10:19:15 -0800 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <[email protected]> | 2020-03-12 13:18:54 -0700 |
commit | 9bf044d2541e1612419ff2ba41758e71a6fd9a9c (patch) | |
tree | 32ed0f4ef74fe37ab3ac76901a08ddf1abbd14bd /src/intel/vulkan/anv_private.h | |
parent | 9b0682df82041fe1ba7136a97a74be7ba4c08de7 (diff) |
anv: Use a dynamic array for storing executables in pipeline
Avoids waste for pipelines that don't use all the shaders, and is
flexible enough to cover cases where there are multiple variants per
shader (e.g. SIMD8/16/32 for fragment shader).
Even though we could pre-calculate the exact size of the array, this
is not a critical path so it is worth preventing the bug that will
likely happen when new variants are added but not accounted for.
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4040>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r-- | src/intel/vulkan/anv_private.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index cdb2a725a91..3607b7d4fcd 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -3145,9 +3145,6 @@ anv_shader_bin_unref(struct anv_device *device, struct anv_shader_bin *shader) anv_shader_bin_destroy(device, shader); } -/* 5 possible simultaneous shader stages and FS may have up to 3 binaries */ -#define MAX_PIPELINE_EXECUTABLES 7 - struct anv_pipeline_executable { gl_shader_stage stage; @@ -3178,8 +3175,7 @@ struct anv_pipeline { struct anv_shader_bin * shaders[MESA_SHADER_STAGES]; - uint32_t num_executables; - struct anv_pipeline_executable executables[MAX_PIPELINE_EXECUTABLES]; + struct util_dynarray executables; const struct gen_l3_config * l3_config; |