diff options
author | Jason Ekstrand <[email protected]> | 2015-10-16 12:04:13 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-10-16 16:30:02 -0700 |
commit | 368e703a01c631f04f2a2a1f5f62f61c06838fae (patch) | |
tree | 222a6c3edbd795578db67c1232dc34f2145952e9 /src/vulkan/anv_meta.c | |
parent | 8ed23654c9f7fed77bc706fbfd1d25edf0d7020e (diff) |
anv/pipeline: Rework dynamic state handling
Aparently, we had the dynamic state array in the pipeline backwards.
Instead of enabling the bits in the pipeline, it disables them and marks
them as "dynamic".
Diffstat (limited to 'src/vulkan/anv_meta.c')
-rw-r--r-- | src/vulkan/anv_meta.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c index 56a0d4b9d18..8f6bc421194 100644 --- a/src/vulkan/anv_meta.c +++ b/src/vulkan/anv_meta.c @@ -240,6 +240,11 @@ anv_device_init_meta_clear_state(struct anv_device *device) .topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, .primitiveRestartEnable = false, }, + .pViewportState = &(VkPipelineViewportStateCreateInfo) { + .sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, + .viewportCount = 1, + .scissorCount = 1, + }, .pRasterState = &(VkPipelineRasterStateCreateInfo) { .sType = VK_STRUCTURE_TYPE_PIPELINE_RASTER_STATE_CREATE_INFO, .depthClipEnable = true, @@ -272,6 +277,21 @@ anv_device_init_meta_clear_state(struct anv_device *device) VK_CHANNEL_R_BIT | VK_CHANNEL_G_BIT | VK_CHANNEL_B_BIT }, } }, + .pDynamicState = &(VkPipelineDynamicStateCreateInfo) { + .sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, + .dynamicStateCount = 9, + .pDynamicStates = (VkDynamicState[]) { + VK_DYNAMIC_STATE_VIEWPORT, + VK_DYNAMIC_STATE_SCISSOR, + VK_DYNAMIC_STATE_LINE_WIDTH, + VK_DYNAMIC_STATE_DEPTH_BIAS, + VK_DYNAMIC_STATE_BLEND_CONSTANTS, + VK_DYNAMIC_STATE_DEPTH_BOUNDS, + VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK, + VK_DYNAMIC_STATE_STENCIL_WRITE_MASK, + VK_DYNAMIC_STATE_STENCIL_REFERENCE, + }, + }, .flags = 0, }, &(struct anv_graphics_pipeline_create_info) { @@ -634,6 +654,11 @@ anv_device_init_meta_blit_state(struct anv_device *device) .topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, .primitiveRestartEnable = false, }, + .pViewportState = &(VkPipelineViewportStateCreateInfo) { + .sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, + .viewportCount = 1, + .scissorCount = 1, + }, .pRasterState = &(VkPipelineRasterStateCreateInfo) { .sType = VK_STRUCTURE_TYPE_PIPELINE_RASTER_STATE_CREATE_INFO, .depthClipEnable = true, @@ -650,6 +675,21 @@ anv_device_init_meta_blit_state(struct anv_device *device) VK_CHANNEL_R_BIT | VK_CHANNEL_G_BIT | VK_CHANNEL_B_BIT }, } }, + .pDynamicState = &(VkPipelineDynamicStateCreateInfo) { + .sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, + .dynamicStateCount = 9, + .pDynamicStates = (VkDynamicState[]) { + VK_DYNAMIC_STATE_VIEWPORT, + VK_DYNAMIC_STATE_SCISSOR, + VK_DYNAMIC_STATE_LINE_WIDTH, + VK_DYNAMIC_STATE_DEPTH_BIAS, + VK_DYNAMIC_STATE_BLEND_CONSTANTS, + VK_DYNAMIC_STATE_DEPTH_BOUNDS, + VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK, + VK_DYNAMIC_STATE_STENCIL_WRITE_MASK, + VK_DYNAMIC_STATE_STENCIL_REFERENCE, + }, + }, .flags = 0, .layout = device->meta_state.blit.pipeline_layout, }; |