renderer_vk: Create MSAA graphics pipelines

Forced on for now, needs some additional detection and masking for when this feature should be used.
This commit is contained in:
Wunkolo 2023-11-10 17:58:52 -08:00
parent c091457984
commit 369a2314c2
3 changed files with 7 additions and 3 deletions

View File

@ -155,7 +155,7 @@ bool GraphicsPipeline::Build(bool fail_on_compile_required) {
const vk::PipelineMultisampleStateCreateInfo multisampling = {
.rasterizationSamples = vk::SampleCountFlagBits(info.attachments.sample_count),
.sampleShadingEnable = false,
.sampleShadingEnable = true,
};
const vk::PipelineColorBlendAttachmentState colorblend_attachment = {
@ -264,8 +264,8 @@ bool GraphicsPipeline::Build(bool fail_on_compile_required) {
.pColorBlendState = &color_blending,
.pDynamicState = &dynamic_info,
.layout = pipeline_layout,
.renderPass =
renderpass_cache.GetRenderpass(info.attachments.color, info.attachments.depth, false),
.renderPass = renderpass_cache.GetRenderpass(info.attachments.color, info.attachments.depth,
false, info.attachments.sample_count),
};
if (fail_on_compile_required) {

View File

@ -511,9 +511,11 @@ bool Instance::CreateDevice() {
.features{
.robustBufferAccess = features.robustBufferAccess,
.geometryShader = features.geometryShader,
.sampleRateShading = features.sampleRateShading,
.logicOp = features.logicOp,
.samplerAnisotropy = features.samplerAnisotropy,
.fragmentStoresAndAtomics = features.fragmentStoresAndAtomics,
.shaderStorageImageMultisample = features.shaderStorageImageMultisample,
.shaderClipDistance = features.shaderClipDistance,
},
},

View File

@ -476,6 +476,7 @@ bool RasterizerVulkan::Draw(bool accelerate, bool is_indexed) {
pipeline_info.attachments.color = framebuffer->Format(SurfaceType::Color);
pipeline_info.attachments.depth = framebuffer->Format(SurfaceType::Depth);
pipeline_info.attachments.sample_count = framebuffer->Samples();
if (shadow_rendering) {
pipeline_cache.BindStorageImage(6, framebuffer->ImageView(SurfaceType::Color));
@ -765,6 +766,7 @@ bool RasterizerVulkan::AccelerateDisplay(const Pica::FramebufferConfig& config,
src_params.stride = pixel_stride;
src_params.is_tiled = false;
src_params.pixel_format = VideoCore::PixelFormatFromGPUPixelFormat(config.color_format);
src_params.sample_count = Settings::values.sample_count.GetValue();
src_params.UpdateParams();
const auto [src_surface_id, src_rect] =