summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/engines/maxwell_3d.cpp1
-rw-r--r--src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp3
-rw-r--r--src/video_core/renderer_vulkan/vk_shader_decompiler.cpp14
3 files changed, 13 insertions, 5 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 1d1f780e7..58dfa8033 100644
--- a/src/video_core/engines/maxwell_3d.cpp
+++ b/src/video_core/engines/maxwell_3d.cpp
@@ -91,6 +91,7 @@ void Maxwell3D::InitializeRegisterDefaults() {
91 regs.rasterize_enable = 1; 91 regs.rasterize_enable = 1;
92 regs.rt_separate_frag_data = 1; 92 regs.rt_separate_frag_data = 1;
93 regs.framebuffer_srgb = 1; 93 regs.framebuffer_srgb = 1;
94 regs.cull.front_face = Maxwell3D::Regs::Cull::FrontFace::ClockWise;
94 95
95 mme_inline[MAXWELL3D_REG_INDEX(draw.vertex_end_gl)] = true; 96 mme_inline[MAXWELL3D_REG_INDEX(draw.vertex_end_gl)] = true;
96 mme_inline[MAXWELL3D_REG_INDEX(draw.vertex_begin_gl)] = true; 97 mme_inline[MAXWELL3D_REG_INDEX(draw.vertex_begin_gl)] = true;
diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp
index 2e0536bf6..b155dfb49 100644
--- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp
+++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp
@@ -191,8 +191,7 @@ UniquePipeline VKGraphicsPipeline::CreatePipeline(const RenderPassParams& render
191 const vk::PipelineRasterizationStateCreateInfo rasterizer_ci( 191 const vk::PipelineRasterizationStateCreateInfo rasterizer_ci(
192 {}, rs.depth_clamp_enable, false, vk::PolygonMode::eFill, 192 {}, rs.depth_clamp_enable, false, vk::PolygonMode::eFill,
193 rs.cull_enable ? MaxwellToVK::CullFace(rs.cull_face) : vk::CullModeFlagBits::eNone, 193 rs.cull_enable ? MaxwellToVK::CullFace(rs.cull_face) : vk::CullModeFlagBits::eNone,
194 rs.cull_enable ? MaxwellToVK::FrontFace(rs.front_face) : vk::FrontFace::eCounterClockwise, 194 MaxwellToVK::FrontFace(rs.front_face), rs.depth_bias_enable, 0.0f, 0.0f, 0.0f, 1.0f);
195 rs.depth_bias_enable, 0.0f, 0.0f, 0.0f, 1.0f);
196 195
197 const vk::PipelineMultisampleStateCreateInfo multisampling_ci( 196 const vk::PipelineMultisampleStateCreateInfo multisampling_ci(
198 {}, vk::SampleCountFlagBits::e1, false, 0.0f, nullptr, false, false); 197 {}, vk::SampleCountFlagBits::e1, false, 0.0f, nullptr, false, false);
diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
index 0cf97cafa..dd6d2ef03 100644
--- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
+++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
@@ -1796,9 +1796,17 @@ private:
1796 return {}; 1796 return {};
1797 } 1797 }
1798 1798
1799 Expression UAtomicAdd(Operation) { 1799 Expression UAtomicAdd(Operation operation) {
1800 UNIMPLEMENTED(); 1800 const auto& smem = std::get<SmemNode>(*operation[0]);
1801 return {}; 1801 Id address = AsUint(Visit(smem.GetAddress()));
1802 address = OpShiftRightLogical(t_uint, address, Constant(t_uint, 2U));
1803 const Id pointer = OpAccessChain(t_smem_uint, shared_memory, address);
1804
1805 const Id scope = Constant(t_uint, static_cast<u32>(spv::Scope::Device));
1806 const Id semantics = Constant(t_uint, 0U);
1807
1808 const Id value = AsUint(Visit(operation[1]));
1809 return {OpAtomicIAdd(t_uint, pointer, scope, semantics, value), Type::Uint};
1802 } 1810 }
1803 1811
1804 Expression Branch(Operation operation) { 1812 Expression Branch(Operation operation) {