mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 07:38:56 +02:00
[vulkan] Removed bresenham line mode for driver issues + adjusted LineLoop to LineStrip handling
This commit is contained in:
parent
e05c74108f
commit
7fe40a37ef
3 changed files with 1 additions and 36 deletions
|
|
@ -757,8 +757,6 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) {
|
|||
IsLine(input_assembly_topology) && any_stippled_lines_supported;
|
||||
const bool supports_rectangular_lines =
|
||||
line_rasterization_supported && device.SupportsRectangularLines();
|
||||
const bool supports_bresenham_lines =
|
||||
line_rasterization_supported && device.SupportsBresenhamLines();
|
||||
const bool supports_smooth_lines = line_rasterization_supported && device.SupportsSmoothLines();
|
||||
|
||||
VkLineRasterizationModeEXT line_rasterization_mode = VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT;
|
||||
|
|
@ -768,14 +766,10 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) {
|
|||
line_rasterization_mode = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT;
|
||||
} else if (supports_rectangular_lines) {
|
||||
line_rasterization_mode = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT;
|
||||
} else if (supports_bresenham_lines) {
|
||||
line_rasterization_mode = VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT;
|
||||
}
|
||||
} else {
|
||||
if (supports_rectangular_lines) {
|
||||
line_rasterization_mode = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT;
|
||||
} else if (supports_bresenham_lines) {
|
||||
line_rasterization_mode = VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT;
|
||||
} else if (supports_smooth_lines) {
|
||||
line_rasterization_mode = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT;
|
||||
}
|
||||
|
|
@ -789,8 +783,6 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) {
|
|||
switch (line_rasterization_mode) {
|
||||
case VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT:
|
||||
return device.SupportsStippledRectangularLines();
|
||||
case VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT:
|
||||
return device.SupportsStippledBresenhamLines();
|
||||
case VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT:
|
||||
return device.SupportsStippledSmoothLines();
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -1518,7 +1518,7 @@ bool QueryCacheRuntime::HostConditionalRenderingCompareValues(VideoCommon::Looku
|
|||
|
||||
if (driver_blocks_pair_resolve || !is_gpu_high) {
|
||||
EndHostConditionalRendering();
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!is_in_bc[0] && !is_in_bc[1]) {
|
||||
|
|
|
|||
|
|
@ -237,7 +237,6 @@ bool IsLineRasterizationTopology(const Device& device, Maxwell::PrimitiveTopolog
|
|||
|
||||
VkLineRasterizationModeEXT SelectLineRasterizationMode(const Device& device, bool smooth_lines) {
|
||||
const bool supports_rectangular_lines = device.SupportsRectangularLines();
|
||||
const bool supports_bresenham_lines = device.SupportsBresenhamLines();
|
||||
const bool supports_smooth_lines = device.SupportsSmoothLines();
|
||||
|
||||
if (smooth_lines) {
|
||||
|
|
@ -247,16 +246,10 @@ VkLineRasterizationModeEXT SelectLineRasterizationMode(const Device& device, boo
|
|||
if (supports_rectangular_lines) {
|
||||
return VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT;
|
||||
}
|
||||
if (supports_bresenham_lines) {
|
||||
return VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT;
|
||||
}
|
||||
} else {
|
||||
if (supports_rectangular_lines) {
|
||||
return VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT;
|
||||
}
|
||||
if (supports_bresenham_lines) {
|
||||
return VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT;
|
||||
}
|
||||
if (supports_smooth_lines) {
|
||||
return VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT;
|
||||
}
|
||||
|
|
@ -269,8 +262,6 @@ bool SupportsStippleForMode(const Device& device, VkLineRasterizationModeEXT mod
|
|||
switch (mode) {
|
||||
case VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT:
|
||||
return device.SupportsStippledRectangularLines();
|
||||
case VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT:
|
||||
return device.SupportsStippledBresenhamLines();
|
||||
case VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT:
|
||||
return device.SupportsStippledSmoothLines();
|
||||
default:
|
||||
|
|
@ -403,15 +394,9 @@ void RasterizerVulkan::Draw(bool is_indexed, u32 instance_count) {
|
|||
if (maxwell3d->regs.transform_feedback_enabled != 0) {
|
||||
query_cache.CounterEnable(VideoCommon::QueryType::StreamingByteCount, false);
|
||||
}
|
||||
scheduler.Record([](vk::CommandBuffer cmdbuf) {
|
||||
cmdbuf.SetPrimitiveTopologyEXT(VK_PRIMITIVE_TOPOLOGY_LINE_LIST);
|
||||
});
|
||||
DrawLineLoopClosure(draw_state, draw_params.base_instance, draw_params.num_instances,
|
||||
static_cast<s32>(draw_params.base_vertex),
|
||||
draw_params.num_vertices, draw_params.is_indexed);
|
||||
scheduler.Record([](vk::CommandBuffer cmdbuf) {
|
||||
cmdbuf.SetPrimitiveTopologyEXT(VK_PRIMITIVE_TOPOLOGY_LINE_STRIP);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -590,9 +575,6 @@ void RasterizerVulkan::DrawIndirectLineLoopClosures(
|
|||
if (maxwell3d->regs.transform_feedback_enabled != 0) {
|
||||
query_cache.CounterEnable(VideoCommon::QueryType::StreamingByteCount, false);
|
||||
}
|
||||
scheduler.Record([](vk::CommandBuffer cmdbuf) {
|
||||
cmdbuf.SetPrimitiveTopologyEXT(VK_PRIMITIVE_TOPOLOGY_LINE_LIST);
|
||||
});
|
||||
emitted_closure = true;
|
||||
}
|
||||
|
||||
|
|
@ -622,9 +604,6 @@ void RasterizerVulkan::DrawIndirectLineLoopClosures(
|
|||
if (maxwell3d->regs.transform_feedback_enabled != 0) {
|
||||
query_cache.CounterEnable(VideoCommon::QueryType::StreamingByteCount, false);
|
||||
}
|
||||
scheduler.Record([](vk::CommandBuffer cmdbuf) {
|
||||
cmdbuf.SetPrimitiveTopologyEXT(VK_PRIMITIVE_TOPOLOGY_LINE_LIST);
|
||||
});
|
||||
emitted_closure = true;
|
||||
}
|
||||
DrawLineLoopClosure(draw_state, command.firstInstance, command.instanceCount,
|
||||
|
|
@ -632,12 +611,6 @@ void RasterizerVulkan::DrawIndirectLineLoopClosures(
|
|||
false);
|
||||
}
|
||||
}
|
||||
|
||||
if (emitted_closure) {
|
||||
scheduler.Record([](vk::CommandBuffer cmdbuf) {
|
||||
cmdbuf.SetPrimitiveTopologyEXT(VK_PRIMITIVE_TOPOLOGY_LINE_STRIP);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void RasterizerVulkan::DrawTexture() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue