diff options
author | Jason Ekstrand <[email protected]> | 2015-10-06 17:21:44 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-10-07 09:40:49 -0700 |
commit | daf68a9465050c798012125e7150017c09576e0f (patch) | |
tree | d453353b281b0ed1d7960234dbf88fe1f6ab4c83 /src/vulkan/gen7_state.c | |
parent | 55fcca306b349a959feecae8f84a6b62f532114f (diff) |
vk/0.170.2: Switch to the new dynamic state model
Diffstat (limited to 'src/vulkan/gen7_state.c')
-rw-r--r-- | src/vulkan/gen7_state.c | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/vulkan/gen7_state.c b/src/vulkan/gen7_state.c index 2497e39490d..d317fa4ec16 100644 --- a/src/vulkan/gen7_state.c +++ b/src/vulkan/gen7_state.c @@ -192,78 +192,6 @@ VkResult gen7_CreateSampler( return VK_SUCCESS; } -VkResult gen7_CreateDynamicRasterState( - VkDevice _device, - const VkDynamicRasterStateCreateInfo* pCreateInfo, - VkDynamicRasterState* pState) -{ - ANV_FROM_HANDLE(anv_device, device, _device); - struct anv_dynamic_rs_state *state; - - assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_DYNAMIC_RASTER_STATE_CREATE_INFO); - - state = anv_device_alloc(device, sizeof(*state), 8, - VK_SYSTEM_ALLOC_TYPE_API_OBJECT); - if (state == NULL) - return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); - - bool enable_bias = pCreateInfo->depthBias != 0.0f || - pCreateInfo->slopeScaledDepthBias != 0.0f; - - struct GEN7_3DSTATE_SF sf = { - GEN7_3DSTATE_SF_header, - .LineWidth = pCreateInfo->lineWidth, - .GlobalDepthOffsetEnableSolid = enable_bias, - .GlobalDepthOffsetEnableWireframe = enable_bias, - .GlobalDepthOffsetEnablePoint = enable_bias, - .GlobalDepthOffsetConstant = pCreateInfo->depthBias, - .GlobalDepthOffsetScale = pCreateInfo->slopeScaledDepthBias, - .GlobalDepthOffsetClamp = pCreateInfo->depthBiasClamp - }; - - GEN7_3DSTATE_SF_pack(NULL, state->gen7.sf, &sf); - - *pState = anv_dynamic_rs_state_to_handle(state); - - return VK_SUCCESS; -} - -VkResult gen7_CreateDynamicDepthStencilState( - VkDevice _device, - const VkDynamicDepthStencilStateCreateInfo* pCreateInfo, - VkDynamicDepthStencilState* pState) -{ - ANV_FROM_HANDLE(anv_device, device, _device); - struct anv_dynamic_ds_state *state; - - assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_DYNAMIC_DEPTH_STENCIL_STATE_CREATE_INFO); - - state = anv_device_alloc(device, sizeof(*state), 8, - VK_SYSTEM_ALLOC_TYPE_API_OBJECT); - if (state == NULL) - return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); - - struct GEN7_DEPTH_STENCIL_STATE depth_stencil_state = { - .StencilTestMask = pCreateInfo->stencilReadMask & 0xff, - .StencilWriteMask = pCreateInfo->stencilWriteMask & 0xff, - .BackfaceStencilTestMask = pCreateInfo->stencilReadMask & 0xff, - .BackfaceStencilWriteMask = pCreateInfo->stencilWriteMask & 0xff, - }; - - GEN7_DEPTH_STENCIL_STATE_pack(NULL, state->gen7.depth_stencil_state, - &depth_stencil_state); - - struct GEN7_COLOR_CALC_STATE color_calc_state = { - .StencilReferenceValue = pCreateInfo->stencilFrontRef, - .BackFaceStencilReferenceValue = pCreateInfo->stencilBackRef - }; - - GEN7_COLOR_CALC_STATE_pack(NULL, state->gen7.color_calc_state, &color_calc_state); - - *pState = anv_dynamic_ds_state_to_handle(state); - - return VK_SUCCESS; -} static const uint8_t anv_halign[] = { [4] = HALIGN_4, |