WIP: Vulkan: Workbench #107886
|
@ -55,9 +55,12 @@ VkImageAspectFlagBits to_vk_image_aspect_flag_bits(const eGPUTextureFormat forma
|
||||||
case GPU_DEPTH_COMPONENT32F:
|
case GPU_DEPTH_COMPONENT32F:
|
||||||
case GPU_DEPTH_COMPONENT24:
|
case GPU_DEPTH_COMPONENT24:
|
||||||
case GPU_DEPTH_COMPONENT16:
|
case GPU_DEPTH_COMPONENT16:
|
||||||
|
return VK_IMAGE_ASPECT_DEPTH_BIT;
|
||||||
|
|
||||||
case GPU_DEPTH32F_STENCIL8:
|
case GPU_DEPTH32F_STENCIL8:
|
||||||
case GPU_DEPTH24_STENCIL8:
|
case GPU_DEPTH24_STENCIL8:
|
||||||
return VK_IMAGE_ASPECT_DEPTH_BIT;
|
return static_cast<VkImageAspectFlagBits>(VK_IMAGE_ASPECT_DEPTH_BIT |
|
||||||
|
VK_IMAGE_ASPECT_STENCIL_BIT);
|
||||||
|
|
||||||
/* Texture only formats. */
|
/* Texture only formats. */
|
||||||
case GPU_RGB32UI:
|
case GPU_RGB32UI:
|
||||||
|
|
|
@ -80,7 +80,7 @@ VkViewport VKFrameBuffer::vk_viewport_get() const
|
||||||
viewport.y = viewport_rect[1];
|
viewport.y = viewport_rect[1];
|
||||||
viewport.width = viewport_rect[2];
|
viewport.width = viewport_rect[2];
|
||||||
viewport.height = viewport_rect[3];
|
viewport.height = viewport_rect[3];
|
||||||
viewport.minDepth = 0.0f;
|
viewport.minDepth = -1.0f;
|
||||||
viewport.maxDepth = 1.0f;
|
viewport.maxDepth = 1.0f;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -15,6 +15,9 @@ VKPipelineStateManager::VKPipelineStateManager()
|
||||||
rasterization_state = {};
|
rasterization_state = {};
|
||||||
rasterization_state.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
|
rasterization_state.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
|
||||||
rasterization_state.lineWidth = 1.0f;
|
rasterization_state.lineWidth = 1.0f;
|
||||||
|
/* By enabling depth clamping we disable depth clipping. */
|
||||||
|
/* Note that this is only possible when device feature is available, which isn't on AMD/Mesa.*/
|
||||||
|
rasterization_state.depthClampEnable = VK_TRUE;
|
||||||
|
|
||||||
pipeline_color_blend_state = {};
|
pipeline_color_blend_state = {};
|
||||||
pipeline_color_blend_state.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
|
pipeline_color_blend_state.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
|
||||||
|
|
Loading…
Reference in New Issue