diff options
author | Jason Ekstrand <[email protected]> | 2015-11-23 14:03:47 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-11-23 14:03:47 -0800 |
commit | 179fc4aae8f782453f0488e8dd508f9a01117376 (patch) | |
tree | 5f0cc77b30d86b581fb968a71ba83c5e4c2546d7 /src/vulkan/anv_pipeline.c | |
parent | e14b2c76b40398a61f45f5d058079641661a66cb (diff) | |
parent | d9b8fde963a53d4e06570d8bece97f806714507a (diff) |
Merge remote-tracking branch 'mesa-public/master' into vulkan
This pulls in nir cloning and some much-needed upstream refactors.
Diffstat (limited to 'src/vulkan/anv_pipeline.c')
-rw-r--r-- | src/vulkan/anv_pipeline.c | 17 |
1 files changed, 3 insertions, 14 deletions
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 |