early-access version 2251
This commit is contained in:
@@ -522,9 +522,8 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) {
|
||||
vertex_attributes.push_back({
|
||||
.location = static_cast<u32>(index),
|
||||
.binding = 0,
|
||||
.format = type == 1 ? VK_FORMAT_R32_SFLOAT
|
||||
: type == 2 ? VK_FORMAT_R32_SINT
|
||||
: VK_FORMAT_R32_UINT,
|
||||
.format = type == 1 ? VK_FORMAT_R32_SFLOAT
|
||||
: type == 2 ? VK_FORMAT_R32_SINT : VK_FORMAT_R32_UINT,
|
||||
.offset = 0,
|
||||
});
|
||||
}
|
||||
@@ -614,25 +613,36 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) {
|
||||
.patchControlPoints = key.state.patch_control_points_minus_one.Value() + 1,
|
||||
};
|
||||
|
||||
void* viewport_next = nullptr;
|
||||
std::array<VkViewportSwizzleNV, Maxwell::NumViewports> swizzles;
|
||||
std::ranges::transform(key.state.viewport_swizzles, swizzles.begin(), UnpackViewportSwizzle);
|
||||
const VkPipelineViewportSwizzleStateCreateInfoNV swizzle_ci{
|
||||
VkPipelineViewportSwizzleStateCreateInfoNV swizzle_ci{
|
||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV,
|
||||
.pNext = nullptr,
|
||||
.pNext = viewport_next,
|
||||
.flags = 0,
|
||||
.viewportCount = Maxwell::NumViewports,
|
||||
.pViewportSwizzles = swizzles.data(),
|
||||
};
|
||||
if (device.IsNvViewportSwizzleSupported()) {
|
||||
viewport_next = &swizzle_ci;
|
||||
}
|
||||
VkPipelineViewportDepthClipControlCreateInfoEXT ndc_info{
|
||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT,
|
||||
.pNext = viewport_next,
|
||||
.negativeOneToOne = key.state.ndc_minus_one_to_one.Value() != 0 ? VK_TRUE : VK_FALSE,
|
||||
};
|
||||
if (device.IsExtDepthClipControlSupported()) {
|
||||
viewport_next = &ndc_info;
|
||||
}
|
||||
const VkPipelineViewportStateCreateInfo viewport_ci{
|
||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO,
|
||||
.pNext = device.IsNvViewportSwizzleSupported() ? &swizzle_ci : nullptr,
|
||||
.pNext = viewport_next,
|
||||
.flags = 0,
|
||||
.viewportCount = Maxwell::NumViewports,
|
||||
.pViewports = nullptr,
|
||||
.scissorCount = Maxwell::NumViewports,
|
||||
.pScissors = nullptr,
|
||||
};
|
||||
|
||||
VkPipelineRasterizationStateCreateInfo rasterization_ci{
|
||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO,
|
||||
.pNext = nullptr,
|
||||
|
@@ -311,6 +311,7 @@ PipelineCache::PipelineCache(RasterizerVulkan& rasterizer_, Tegra::Engines::Maxw
|
||||
.support_int64_atomics = device.IsExtShaderAtomicInt64Supported(),
|
||||
.support_derivative_control = true,
|
||||
.support_geometry_shader_passthrough = device.IsNvGeometryShaderPassthroughSupported(),
|
||||
.support_native_ndc = device.IsExtDepthClipControlSupported(),
|
||||
|
||||
.warp_size_potentially_larger_than_guest = device.IsWarpSizePotentiallyBiggerThanGuest(),
|
||||
|
||||
|
Reference in New Issue
Block a user