diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index f1523df757..d81848880e 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -611,7 +611,7 @@ void DrawEngineVulkan::DoFlush(VkCommandBuffer cmd) { }; vkCmdBindDescriptorSets(cmd_, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout_, 0, 1, &ds, 3, dynamicUBOOffsets); - vbOffset = (uint32_t)frame->pushData->Push(decoded, numTrans * dec_->GetDecVtxFmt().stride); + vbOffset = (uint32_t)frame->pushData->Push(drawBuffer, numTrans * sizeof(TransformedVertex)); VkBuffer buf[1] = { frame->pushData->GetVkBuffer() }; VkDeviceSize offsets[1] = { vbOffset }; diff --git a/GPU/Vulkan/PipelineManagerVulkan.cpp b/GPU/Vulkan/PipelineManagerVulkan.cpp index e7c97a0c92..28883b7ab3 100644 --- a/GPU/Vulkan/PipelineManagerVulkan.cpp +++ b/GPU/Vulkan/PipelineManagerVulkan.cpp @@ -33,13 +33,13 @@ static const DeclTypeInfo VComp[] = { { VK_FORMAT_R32G32B32_SFLOAT, "R32G32B32_SFLOAT " }, // DEC_FLOAT_3, { VK_FORMAT_R32G32B32A32_SFLOAT, "R32G32B32A32_SFLOAT " }, // DEC_FLOAT_4, - { VK_FORMAT_UNDEFINED, "UNDEFINED" }, // DEC_S8_3, - + { VK_FORMAT_R8G8B8A8_SNORM, "UNDEFINED" }, // DEC_S8_3, { VK_FORMAT_R16G16B16A16_SNORM, "R16G16B16A16_SNORM " }, // DEC_S16_3, - { VK_FORMAT_R8G8B8A8_SNORM, "R8G8B8A8_SNORM " }, // DEC_U8_1, - { VK_FORMAT_R8G8B8A8_SNORM, "R8G8B8A8_SNORM " }, // DEC_U8_2, - { VK_FORMAT_R8G8B8A8_SNORM, "R8G8B8A8_SNORM " }, // DEC_U8_3, - { VK_FORMAT_R8G8B8A8_SNORM, "R8G8B8A8_SNORM " }, // DEC_U8_4, + + { VK_FORMAT_R8G8B8A8_UNORM, "R8G8B8A8_UNORM " }, // DEC_U8_1, + { VK_FORMAT_R8G8B8A8_UNORM, "R8G8B8A8_UNORM " }, // DEC_U8_2, + { VK_FORMAT_R8G8B8A8_UNORM, "R8G8B8A8_UNORM " }, // DEC_U8_3, + { VK_FORMAT_R8G8B8A8_UNORM, "R8G8B8A8_UNORM " }, // DEC_U8_4, { VK_FORMAT_R16G16_UNORM, "R16G16_UNORM" }, // DEC_U16_1, { VK_FORMAT_R16G16_UNORM, "R16G16_UNORM" }, // DEC_U16_2, { VK_FORMAT_R16G16B16A16_UNORM, "R16G16B16A16_UNORM " }, // DEC_U16_3, diff --git a/GPU/Vulkan/ShaderManagerVulkan.cpp b/GPU/Vulkan/ShaderManagerVulkan.cpp index a51fedd901..a9808b584f 100644 --- a/GPU/Vulkan/ShaderManagerVulkan.cpp +++ b/GPU/Vulkan/ShaderManagerVulkan.cpp @@ -241,7 +241,7 @@ void ShaderManagerVulkan::BaseUpdateUniforms(int dirtyUniforms) { if (dirtyUniforms & DIRTY_PROJMATRIX) { if (gstate.isModeThrough()) { Matrix4x4 proj_through; - proj_through.setOrtho(0.0f, gstate_c.curRTWidth, gstate_c.curRTHeight, 0, 0, 1); + proj_through.setOrtho(0.0f, gstate_c.curRTWidth, 0, gstate_c.curRTHeight, 0, 1); ConvertProjMatrixToVulkanThrough(proj_through); CopyMatrix4x4(ub_base.proj, proj_through.getReadPtr()); } else { @@ -262,7 +262,6 @@ void ShaderManagerVulkan::BaseUpdateUniforms(int dirtyUniforms) { flippedMatrix[8] = -flippedMatrix[8]; flippedMatrix[12] = -flippedMatrix[12]; } - ConvertProjMatrixToVulkan(flippedMatrix, invertedX, invertedY); CopyMatrix4x4(ub_base.proj, flippedMatrix.getReadPtr()); } diff --git a/GPU/Vulkan/StateMappingVulkan.cpp b/GPU/Vulkan/StateMappingVulkan.cpp index 18e0a2e14b..6af78f6c6e 100644 --- a/GPU/Vulkan/StateMappingVulkan.cpp +++ b/GPU/Vulkan/StateMappingVulkan.cpp @@ -32,6 +32,7 @@ #include "GPU/Vulkan/FramebufferVulkan.h" //#include "GPU/Vulkan/PixelShaderGeneratorVulkan.h" +// These tables all fit into u8s. static const VkBlendFactor vkBlendFactorLookup[(size_t)BlendFactor::COUNT] = { VK_BLEND_FACTOR_ZERO, VK_BLEND_FACTOR_ONE,