mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
tests: Offset the viewport by 0.5 when running d3dbc shaders.
This commit is contained in:
parent
806363b765
commit
ded0733ff8
Notes:
Henri Verbeet
2024-07-11 17:16:48 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/870
@ -726,7 +726,7 @@ static VkPipeline create_graphics_pipeline(struct vulkan_shader_runner *runner,
|
||||
VkPipelineVertexInputStateCreateInfo input_desc = {.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO};
|
||||
VkPipelineColorBlendStateCreateInfo blend_desc = {.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO};
|
||||
VkPipelineMultisampleStateCreateInfo ms_desc = {.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO};
|
||||
static const VkViewport viewport = {.y = RENDER_TARGET_HEIGHT,
|
||||
VkViewport viewport = {.y = RENDER_TARGET_HEIGHT,
|
||||
.width = RENDER_TARGET_WIDTH, .height = -RENDER_TARGET_HEIGHT, .maxDepth = 1};
|
||||
VkPipelineViewportStateCreateInfo vp_desc = {.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO};
|
||||
static const VkRect2D rt_rect = {.extent.width = RENDER_TARGET_WIDTH, .extent.height = RENDER_TARGET_HEIGHT};
|
||||
@ -849,6 +849,12 @@ static VkPipeline create_graphics_pipeline(struct vulkan_shader_runner *runner,
|
||||
|
||||
ia_desc.topology = vulkan_primitive_topology_from_d3d(primitive_topology);
|
||||
|
||||
if (runner->r.minimum_shader_model < SHADER_MODEL_4_0)
|
||||
{
|
||||
viewport.x += 0.5f;
|
||||
viewport.y += 0.5f;
|
||||
}
|
||||
|
||||
vp_desc.viewportCount = 1;
|
||||
vp_desc.pViewports = &viewport;
|
||||
vp_desc.scissorCount = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user