[Mesa-dev] [PATCH] radv: don't create dummy fs when compiling compute stage
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Wed Oct 18 07:21:56 UTC 2017
r-b
On Wed, Oct 18, 2017 at 5:02 AM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> Fixes: d1c9f30d7ff7 "radv: add radv_create_shaders() helper"
> ---
> src/amd/vulkan/radv_pipeline.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
> index 00315460c2..116e706f98 100644
> --- a/src/amd/vulkan/radv_pipeline.c
> +++ b/src/amd/vulkan/radv_pipeline.c
> @@ -1604,21 +1604,21 @@ void radv_create_shaders(struct radv_pipeline *pipeline,
> if (modules[MESA_SHADER_GEOMETRY]) {
> struct radv_shader_variant *variants[MESA_SHADER_STAGES] = {0};
> radv_create_shader_variants_from_pipeline_cache(device, cache, gs_copy_hash, variants);
> pipeline->gs_copy_shader = variants[MESA_SHADER_GEOMETRY];
> }
>
> if (radv_create_shader_variants_from_pipeline_cache(device, cache, hash, pipeline->shaders) &&
> (!modules[MESA_SHADER_GEOMETRY] || pipeline->gs_copy_shader))
> return;
>
> - if (!modules[MESA_SHADER_FRAGMENT]) {
> + if (!modules[MESA_SHADER_FRAGMENT] && !modules[MESA_SHADER_COMPUTE]) {
> nir_builder fs_b;
> nir_builder_init_simple_shader(&fs_b, NULL, MESA_SHADER_FRAGMENT, NULL);
> fs_b.shader->info.name = ralloc_strdup(fs_b.shader, "noop_fs");
> fs_m.nir = fs_b.shader;
> modules[MESA_SHADER_FRAGMENT] = &fs_m;
> }
>
> int prev = -1;
> for (unsigned i = 0; i < MESA_SHADER_STAGES; ++i) {
> const VkPipelineShaderStageCreateInfo *stage = pStages[i];
> --
> 2.13.6
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list