diff options
Diffstat (limited to 'src')
6 files changed, 16 insertions, 7 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index c66c66f6c..430ee86ba 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -1871,7 +1871,8 @@ public: | |||
| 1871 | ICMP_R, | 1871 | ICMP_R, |
| 1872 | ICMP_CR, | 1872 | ICMP_CR, |
| 1873 | ICMP_IMM, | 1873 | ICMP_IMM, |
| 1874 | FCMP_R, | 1874 | FCMP_RR, |
| 1875 | FCMP_RC, | ||
| 1875 | MUFU, // Multi-Function Operator | 1876 | MUFU, // Multi-Function Operator |
| 1876 | RRO_C, // Range Reduction Operator | 1877 | RRO_C, // Range Reduction Operator |
| 1877 | RRO_R, | 1878 | RRO_R, |
| @@ -2179,7 +2180,8 @@ private: | |||
| 2179 | INST("0101110100100---", Id::HSETP2_R, Type::HalfSetPredicate, "HSETP2_R"), | 2180 | INST("0101110100100---", Id::HSETP2_R, Type::HalfSetPredicate, "HSETP2_R"), |
| 2180 | INST("0111111-0-------", Id::HSETP2_IMM, Type::HalfSetPredicate, "HSETP2_IMM"), | 2181 | INST("0111111-0-------", Id::HSETP2_IMM, Type::HalfSetPredicate, "HSETP2_IMM"), |
| 2181 | INST("0101110100011---", Id::HSET2_R, Type::HalfSet, "HSET2_R"), | 2182 | INST("0101110100011---", Id::HSET2_R, Type::HalfSet, "HSET2_R"), |
| 2182 | INST("010110111010----", Id::FCMP_R, Type::Arithmetic, "FCMP_R"), | 2183 | INST("010110111010----", Id::FCMP_RR, Type::Arithmetic, "FCMP_RR"), |
| 2184 | INST("010010111010----", Id::FCMP_RC, Type::Arithmetic, "FCMP_RC"), | ||
| 2183 | INST("0101000010000---", Id::MUFU, Type::Arithmetic, "MUFU"), | 2185 | INST("0101000010000---", Id::MUFU, Type::Arithmetic, "MUFU"), |
| 2184 | INST("0100110010010---", Id::RRO_C, Type::Arithmetic, "RRO_C"), | 2186 | INST("0100110010010---", Id::RRO_C, Type::Arithmetic, "RRO_C"), |
| 2185 | INST("0101110010010---", Id::RRO_R, Type::Arithmetic, "RRO_R"), | 2187 | INST("0101110010010---", Id::RRO_R, Type::Arithmetic, "RRO_R"), |
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 6d2ff20f9..12c6dcfde 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp | |||
| @@ -34,6 +34,8 @@ | |||
| 34 | namespace OpenGL { | 34 | namespace OpenGL { |
| 35 | 35 | ||
| 36 | using Tegra::Engines::ShaderType; | 36 | using Tegra::Engines::ShaderType; |
| 37 | using VideoCommon::Shader::CompileDepth; | ||
| 38 | using VideoCommon::Shader::CompilerSettings; | ||
| 37 | using VideoCommon::Shader::ProgramCode; | 39 | using VideoCommon::Shader::ProgramCode; |
| 38 | using VideoCommon::Shader::Registry; | 40 | using VideoCommon::Shader::Registry; |
| 39 | using VideoCommon::Shader::ShaderIR; | 41 | using VideoCommon::Shader::ShaderIR; |
| @@ -43,7 +45,7 @@ namespace { | |||
| 43 | constexpr u32 STAGE_MAIN_OFFSET = 10; | 45 | constexpr u32 STAGE_MAIN_OFFSET = 10; |
| 44 | constexpr u32 KERNEL_MAIN_OFFSET = 0; | 46 | constexpr u32 KERNEL_MAIN_OFFSET = 0; |
| 45 | 47 | ||
| 46 | constexpr VideoCommon::Shader::CompilerSettings COMPILER_SETTINGS{}; | 48 | constexpr CompilerSettings COMPILER_SETTINGS{CompileDepth::FullDecompile}; |
| 47 | 49 | ||
| 48 | /// Gets the address for the specified shader stage program | 50 | /// Gets the address for the specified shader stage program |
| 49 | GPUVAddr GetShaderAddress(Core::System& system, Maxwell::ShaderProgram program) { | 51 | GPUVAddr GetShaderAddress(Core::System& system, Maxwell::ShaderProgram program) { |
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 1f1f01313..59bbd1211 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -1821,13 +1821,15 @@ private: | |||
| 1821 | Expression HMergeH0(Operation operation) { | 1821 | Expression HMergeH0(Operation operation) { |
| 1822 | const std::string dest = VisitOperand(operation, 0).AsUint(); | 1822 | const std::string dest = VisitOperand(operation, 0).AsUint(); |
| 1823 | const std::string src = VisitOperand(operation, 1).AsUint(); | 1823 | const std::string src = VisitOperand(operation, 1).AsUint(); |
| 1824 | return {fmt::format("bitfieldInsert({}, {}, 0, 16)", dest, src), Type::Uint}; | 1824 | return {fmt::format("vec2(unpackHalf2x16({}).x, unpackHalf2x16({}).y)", src, dest), |
| 1825 | Type::HalfFloat}; | ||
| 1825 | } | 1826 | } |
| 1826 | 1827 | ||
| 1827 | Expression HMergeH1(Operation operation) { | 1828 | Expression HMergeH1(Operation operation) { |
| 1828 | const std::string dest = VisitOperand(operation, 0).AsUint(); | 1829 | const std::string dest = VisitOperand(operation, 0).AsUint(); |
| 1829 | const std::string src = VisitOperand(operation, 1).AsUint(); | 1830 | const std::string src = VisitOperand(operation, 1).AsUint(); |
| 1830 | return {fmt::format("bitfieldInsert({}, {}, 16, 16)", dest, src), Type::Uint}; | 1831 | return {fmt::format("vec2(unpackHalf2x16({}).x, unpackHalf2x16({}).y)", dest, src), |
| 1832 | Type::HalfFloat}; | ||
| 1831 | } | 1833 | } |
| 1832 | 1834 | ||
| 1833 | Expression HPack2(Operation operation) { | 1835 | Expression HPack2(Operation operation) { |
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 0b4d999d7..2729d1265 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp | |||
| @@ -417,7 +417,7 @@ void CachedSurfaceView::Attach(GLenum attachment, GLenum target) const { | |||
| 417 | 417 | ||
| 418 | switch (params.target) { | 418 | switch (params.target) { |
| 419 | case SurfaceTarget::Texture2DArray: | 419 | case SurfaceTarget::Texture2DArray: |
| 420 | glFramebufferTexture(target, attachment, GetTexture(), params.base_level); | 420 | glFramebufferTexture(target, attachment, GetTexture(), 0); |
| 421 | break; | 421 | break; |
| 422 | default: | 422 | default: |
| 423 | UNIMPLEMENTED(); | 423 | UNIMPLEMENTED(); |
diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp index 21644a7e7..fbd406f2b 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp +++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp | |||
| @@ -535,7 +535,9 @@ void VKBlitScreen::CreateGraphicsPipeline() { | |||
| 535 | viewport_state_ci.pNext = nullptr; | 535 | viewport_state_ci.pNext = nullptr; |
| 536 | viewport_state_ci.flags = 0; | 536 | viewport_state_ci.flags = 0; |
| 537 | viewport_state_ci.viewportCount = 1; | 537 | viewport_state_ci.viewportCount = 1; |
| 538 | viewport_state_ci.pViewports = nullptr; | ||
| 538 | viewport_state_ci.scissorCount = 1; | 539 | viewport_state_ci.scissorCount = 1; |
| 540 | viewport_state_ci.pScissors = nullptr; | ||
| 539 | 541 | ||
| 540 | VkPipelineRasterizationStateCreateInfo rasterization_ci; | 542 | VkPipelineRasterizationStateCreateInfo rasterization_ci; |
| 541 | rasterization_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; | 543 | rasterization_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; |
diff --git a/src/video_core/shader/decode/arithmetic.cpp b/src/video_core/shader/decode/arithmetic.cpp index 478394682..4db329fa5 100644 --- a/src/video_core/shader/decode/arithmetic.cpp +++ b/src/video_core/shader/decode/arithmetic.cpp | |||
| @@ -136,7 +136,8 @@ u32 ShaderIR::DecodeArithmetic(NodeBlock& bb, u32 pc) { | |||
| 136 | SetRegister(bb, instr.gpr0, value); | 136 | SetRegister(bb, instr.gpr0, value); |
| 137 | break; | 137 | break; |
| 138 | } | 138 | } |
| 139 | case OpCode::Id::FCMP_R: { | 139 | case OpCode::Id::FCMP_RR: |
| 140 | case OpCode::Id::FCMP_RC: { | ||
| 140 | UNIMPLEMENTED_IF(instr.fcmp.ftz == 0); | 141 | UNIMPLEMENTED_IF(instr.fcmp.ftz == 0); |
| 141 | Node op_c = GetRegister(instr.gpr39); | 142 | Node op_c = GetRegister(instr.gpr39); |
| 142 | Node comp = GetPredicateComparisonFloat(instr.fcmp.cond, std::move(op_c), Immediate(0.0f)); | 143 | Node comp = GetPredicateComparisonFloat(instr.fcmp.cond, std::move(op_c), Immediate(0.0f)); |