X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fvulkan%2Fanv_pipeline.c;h=3d9e0705626ebdbe626491c56c5fe1be1c91bff9;hb=179fc4aae8f782453f0488e8dd508f9a01117376;hp=1193d1e7a5df93fd0e2a261d29e495317dade846;hpb=e14b2c76b40398a61f45f5d058079641661a66cb;p=mesa.git diff --git a/src/vulkan/anv_pipeline.c b/src/vulkan/anv_pipeline.c index 1193d1e7a5d..3d9e0705626 100644 --- a/src/vulkan/anv_pipeline.c +++ b/src/vulkan/anv_pipeline.c @@ -125,17 +125,7 @@ bool anv_is_scalar_shader_stage(const struct brw_compiler *compiler, VkShaderStage stage) { - switch (stage) { - case VK_SHADER_STAGE_VERTEX: - return compiler->scalar_vs; - case VK_SHADER_STAGE_GEOMETRY: - return false; - case VK_SHADER_STAGE_FRAGMENT: - case VK_SHADER_STAGE_COMPUTE: - return true; - default: - unreachable("Unsupported shader stage"); - } + return compiler->scalar_stage[vk_shader_stage_to_mesa_stage[stage]]; } /* Eventually, this will become part of anv_CreateShader. Unfortunately, @@ -187,8 +177,7 @@ anv_shader_compile_to_nir(struct anv_device *device, } assert(entrypoint != NULL); - brw_preprocess_nir(nir, &device->info, - anv_is_scalar_shader_stage(compiler, vk_stage)); + nir = brw_preprocess_nir(nir, compiler->scalar_stage[stage]); nir_shader_gather_info(nir, entrypoint); @@ -411,7 +400,7 @@ anv_pipeline_compile(struct anv_pipeline *pipeline, prog_data->binding_table.image_start = bias; /* Finish the optimization and compilation process */ - brw_postprocess_nir(nir, &pipeline->device->info, + nir = brw_lower_nir(nir, &pipeline->device->info, NULL, anv_is_scalar_shader_stage(compiler, stage)); /* nir_lower_io will only handle the push constants; we need to set this