Vertex format fixes. Flip through drawing the right way up.
This commit is contained in:
parent
6b8c004561
commit
ec6bc4a5f6
4 changed files with 9 additions and 9 deletions
|
@ -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 };
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue