mirror of
https://github.com/citra-emu/citra.git
synced 2025-04-28 10:00:06 +00:00
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:
parent
c091457984
commit
369a2314c2
@ -155,7 +155,7 @@ bool GraphicsPipeline::Build(bool fail_on_compile_required) {
|
|||||||
|
|
||||||
const vk::PipelineMultisampleStateCreateInfo multisampling = {
|
const vk::PipelineMultisampleStateCreateInfo multisampling = {
|
||||||
.rasterizationSamples = vk::SampleCountFlagBits(info.attachments.sample_count),
|
.rasterizationSamples = vk::SampleCountFlagBits(info.attachments.sample_count),
|
||||||
.sampleShadingEnable = false,
|
.sampleShadingEnable = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const vk::PipelineColorBlendAttachmentState colorblend_attachment = {
|
const vk::PipelineColorBlendAttachmentState colorblend_attachment = {
|
||||||
@ -264,8 +264,8 @@ bool GraphicsPipeline::Build(bool fail_on_compile_required) {
|
|||||||
.pColorBlendState = &color_blending,
|
.pColorBlendState = &color_blending,
|
||||||
.pDynamicState = &dynamic_info,
|
.pDynamicState = &dynamic_info,
|
||||||
.layout = pipeline_layout,
|
.layout = pipeline_layout,
|
||||||
.renderPass =
|
.renderPass = renderpass_cache.GetRenderpass(info.attachments.color, info.attachments.depth,
|
||||||
renderpass_cache.GetRenderpass(info.attachments.color, info.attachments.depth, false),
|
false, info.attachments.sample_count),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (fail_on_compile_required) {
|
if (fail_on_compile_required) {
|
||||||
|
@ -511,9 +511,11 @@ bool Instance::CreateDevice() {
|
|||||||
.features{
|
.features{
|
||||||
.robustBufferAccess = features.robustBufferAccess,
|
.robustBufferAccess = features.robustBufferAccess,
|
||||||
.geometryShader = features.geometryShader,
|
.geometryShader = features.geometryShader,
|
||||||
|
.sampleRateShading = features.sampleRateShading,
|
||||||
.logicOp = features.logicOp,
|
.logicOp = features.logicOp,
|
||||||
.samplerAnisotropy = features.samplerAnisotropy,
|
.samplerAnisotropy = features.samplerAnisotropy,
|
||||||
.fragmentStoresAndAtomics = features.fragmentStoresAndAtomics,
|
.fragmentStoresAndAtomics = features.fragmentStoresAndAtomics,
|
||||||
|
.shaderStorageImageMultisample = features.shaderStorageImageMultisample,
|
||||||
.shaderClipDistance = features.shaderClipDistance,
|
.shaderClipDistance = features.shaderClipDistance,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -476,6 +476,7 @@ bool RasterizerVulkan::Draw(bool accelerate, bool is_indexed) {
|
|||||||
|
|
||||||
pipeline_info.attachments.color = framebuffer->Format(SurfaceType::Color);
|
pipeline_info.attachments.color = framebuffer->Format(SurfaceType::Color);
|
||||||
pipeline_info.attachments.depth = framebuffer->Format(SurfaceType::Depth);
|
pipeline_info.attachments.depth = framebuffer->Format(SurfaceType::Depth);
|
||||||
|
pipeline_info.attachments.sample_count = framebuffer->Samples();
|
||||||
|
|
||||||
if (shadow_rendering) {
|
if (shadow_rendering) {
|
||||||
pipeline_cache.BindStorageImage(6, framebuffer->ImageView(SurfaceType::Color));
|
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.stride = pixel_stride;
|
||||||
src_params.is_tiled = false;
|
src_params.is_tiled = false;
|
||||||
src_params.pixel_format = VideoCore::PixelFormatFromGPUPixelFormat(config.color_format);
|
src_params.pixel_format = VideoCore::PixelFormatFromGPUPixelFormat(config.color_format);
|
||||||
|
src_params.sample_count = Settings::values.sample_count.GetValue();
|
||||||
src_params.UpdateParams();
|
src_params.UpdateParams();
|
||||||
|
|
||||||
const auto [src_surface_id, src_rect] =
|
const auto [src_surface_id, src_rect] =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user