mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-23 16:41:51 +01:00
Check for supportsMultipleViewports
feature before usage
If the host only supports a single viewport then we set `viewportCount` and `scissorCount` in `VkPipelineViewportStateCreateInfo` to 1.
This commit is contained in:
parent
3e45006d14
commit
e9ed771b48
@ -43,6 +43,10 @@ namespace skyline::gpu::interconnect {
|
||||
public:
|
||||
GraphicsContext(GPU &gpu, soc::gm20b::ChannelContext &channelCtx, gpu::interconnect::CommandExecutor &executor) : gpu(gpu), channelCtx(channelCtx), executor(executor) {
|
||||
scissors.fill(DefaultScissor);
|
||||
if (!gpu.quirks.supportsMultipleViewports) {
|
||||
viewportState.viewportCount = 1;
|
||||
viewportState.scissorCount = 1;
|
||||
}
|
||||
|
||||
u32 bindingIndex{};
|
||||
for (auto &vertexBinding : vertexBindings)
|
||||
|
@ -39,12 +39,13 @@ namespace skyline {
|
||||
}
|
||||
|
||||
FEAT_SET(vk::PhysicalDeviceFeatures2, features.logicOp, supportsLogicOp)
|
||||
FEAT_SET(vk::PhysicalDeviceFeatures2, features.multiViewport, supportsMultipleViewports)
|
||||
FEAT_SET(vk::PhysicalDeviceVertexAttributeDivisorFeaturesEXT, vertexAttributeInstanceRateZeroDivisor, supportsVertexAttributeZeroDivisor)
|
||||
|
||||
#undef FEAT_SET
|
||||
}
|
||||
|
||||
std::string QuirkManager::Summary() {
|
||||
return fmt::format("\n* Supports Last Provoking Vertex: {}\n* Supports Logical Operations: {}\n* Supports Vertex Attribute Divisor: {}\n* Supports Vertex Attribute Zero Divisor: {}", supportsLastProvokingVertex, supportsLogicOp, supportsVertexAttributeDivisor, supportsVertexAttributeZeroDivisor);
|
||||
return fmt::format("\n* Supports Last Provoking Vertex: {}\n* Supports Logical Operations: {}\n* Supports Vertex Attribute Divisor: {}\n* Supports Vertex Attribute Zero Divisor: {}\n* Supports Multiple Viewports: {}", supportsLastProvokingVertex, supportsLogicOp, supportsVertexAttributeDivisor, supportsVertexAttributeZeroDivisor, supportsMultipleViewports);
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ namespace skyline {
|
||||
bool supportsLogicOp{}; //!< If the device supports framebuffer logical operations during blending
|
||||
bool supportsVertexAttributeDivisor{}; //!< If the device supports a divisor for instance-rate vertex attributes (with VK_EXT_vertex_attribute_divisor)
|
||||
bool supportsVertexAttributeZeroDivisor{}; //!< If the device supports a zero divisor for instance-rate vertex attributes (with VK_EXT_vertex_attribute_divisor)
|
||||
bool supportsMultipleViewports{}; //!< If the device supports more than one viewport
|
||||
|
||||
QuirkManager() = default;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user