mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-12-28 18:46:06 +00:00
hot-fix: skip indirect draw for quad lists
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / windows-qt (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / macos-qt (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-qt (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled
* needs to be fixed properly with indirect args re-packing
This commit is contained in:
parent
23bb5f09fd
commit
001b94e802
|
@ -226,6 +226,18 @@ void Rasterizer::DrawIndirect(bool is_indexed, VAddr arg_address, u32 offset, u3
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto& regs = liverpool->regs;
|
||||||
|
if (regs.primitive_type == AmdGpu::PrimitiveType::QuadList) {
|
||||||
|
// For QuadList we use generated index buffer to convert quads to triangles. Since it
|
||||||
|
// changes type of the draw, arguments are not valid for this case. We need to run a
|
||||||
|
// conversion pass to repack the indirect arguments buffer first.
|
||||||
|
LOG_WARNING(Render_Vulkan, "QuadList primitive type is not supported for indirect draw");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ASSERT_MSG(regs.primitive_type != AmdGpu::PrimitiveType::RectList,
|
||||||
|
"Unsupported primitive type for indirect draw");
|
||||||
|
|
||||||
const GraphicsPipeline* pipeline = pipeline_cache.GetGraphicsPipeline();
|
const GraphicsPipeline* pipeline = pipeline_cache.GetGraphicsPipeline();
|
||||||
if (!pipeline) {
|
if (!pipeline) {
|
||||||
return;
|
return;
|
||||||
|
@ -233,10 +245,6 @@ void Rasterizer::DrawIndirect(bool is_indexed, VAddr arg_address, u32 offset, u3
|
||||||
|
|
||||||
auto state = PrepareRenderState(pipeline->GetMrtMask());
|
auto state = PrepareRenderState(pipeline->GetMrtMask());
|
||||||
|
|
||||||
const auto& regs = liverpool->regs;
|
|
||||||
ASSERT_MSG(regs.primitive_type != AmdGpu::PrimitiveType::RectList,
|
|
||||||
"Unsupported primitive type for indirect draw");
|
|
||||||
|
|
||||||
if (!BindResources(pipeline)) {
|
if (!BindResources(pipeline)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -245,7 +253,7 @@ void Rasterizer::DrawIndirect(bool is_indexed, VAddr arg_address, u32 offset, u3
|
||||||
buffer_cache.BindVertexBuffers(vs_info);
|
buffer_cache.BindVertexBuffers(vs_info);
|
||||||
buffer_cache.BindIndexBuffer(is_indexed, 0);
|
buffer_cache.BindIndexBuffer(is_indexed, 0);
|
||||||
|
|
||||||
const auto [buffer, base] =
|
const auto& [buffer, base] =
|
||||||
buffer_cache.ObtainBuffer(arg_address + offset, stride * max_count, false);
|
buffer_cache.ObtainBuffer(arg_address + offset, stride * max_count, false);
|
||||||
|
|
||||||
VideoCore::Buffer* count_buffer{};
|
VideoCore::Buffer* count_buffer{};
|
||||||
|
|
Loading…
Reference in a new issue