diff options
author | Connor Abbott <[email protected]> | 2020-06-16 17:00:31 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-17 13:13:05 +0000 |
commit | 6fcbce3b9960a6066cf198d5d2fc25a7e4cf0e7b (patch) | |
tree | 6db2e516ac6bf05dbbc07e8f8a8803c16823f2aa /src/freedreno/vulkan/tu_shader.c | |
parent | 808992fc506b02908468b64082981ddb4e58f713 (diff) |
tu: Remove tu_shader_compile_options
The only two fields were always true, and I don't think we'd ever have
use for them. If we want to disable optimizations then we'd need a
different approach, and I don't even know what include_binning_pass was
for.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5500>
Diffstat (limited to 'src/freedreno/vulkan/tu_shader.c')
-rw-r--r-- | src/freedreno/vulkan/tu_shader.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c index 1717a8bd1c1..a43280e6a17 100644 --- a/src/freedreno/vulkan/tu_shader.c +++ b/src/freedreno/vulkan/tu_shader.c @@ -657,47 +657,6 @@ tu_shader_destroy(struct tu_device *dev, vk_free2(&dev->alloc, alloc, shader); } -void -tu_shader_compile_options_init( - struct tu_shader_compile_options *options, - const VkGraphicsPipelineCreateInfo *pipeline_info) -{ - bool has_gs = false; - bool msaa = false; - if (pipeline_info) { - for (uint32_t i = 0; i < pipeline_info->stageCount; i++) { - if (pipeline_info->pStages[i].stage == VK_SHADER_STAGE_GEOMETRY_BIT) { - has_gs = true; - break; - } - } - - const VkPipelineMultisampleStateCreateInfo *msaa_info = pipeline_info->pMultisampleState; - const struct VkPipelineSampleLocationsStateCreateInfoEXT *sample_locations = - vk_find_struct_const(msaa_info->pNext, PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT); - if (!pipeline_info->pRasterizationState->rasterizerDiscardEnable && - (msaa_info->rasterizationSamples > 1 || - /* also set msaa key when sample location is not the default - * since this affects varying interpolation */ - (sample_locations && sample_locations->sampleLocationsEnable))) { - msaa = true; - } - } - - *options = (struct tu_shader_compile_options) { - /* TODO: Populate the remaining fields of ir3_shader_key. */ - .key = { - .has_gs = has_gs, - .msaa = msaa, - }, - /* TODO: VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT - * some optimizations need to happen otherwise shader might not compile - */ - .optimize = true, - .include_binning_pass = true, - }; -} - VkResult tu_CreateShaderModule(VkDevice _device, const VkShaderModuleCreateInfo *pCreateInfo, |