diff --git a/GPU/Common/DrawEngineCommon.h b/GPU/Common/DrawEngineCommon.h index e0cc74f3e8..047cbcd98d 100644 --- a/GPU/Common/DrawEngineCommon.h +++ b/GPU/Common/DrawEngineCommon.h @@ -98,6 +98,7 @@ protected: int prevSizeTex; int prevSizeCol; public: + virtual ~TessellationDataTransfer() {} // Send spline/bezier's control points to vertex shader through floating point texture. virtual void SendDataToShader(const float *pos, const float *tex, const float *col, int size, bool hasColor, bool hasTexCoords) = 0; }; diff --git a/GPU/Vulkan/DrawEngineVulkan.h b/GPU/Vulkan/DrawEngineVulkan.h index b047d92ae3..959c4694d4 100644 --- a/GPU/Vulkan/DrawEngineVulkan.h +++ b/GPU/Vulkan/DrawEngineVulkan.h @@ -220,7 +220,7 @@ private: enum { MAX_DEFERRED_DRAW_CALLS = 128 }; // State cache - uint32_t dirtyUniforms_; + uint64_t dirtyUniforms_; uint32_t baseUBOOffset; uint32_t lightUBOOffset; uint32_t boneUBOOffset; diff --git a/GPU/Vulkan/ShaderManagerVulkan.cpp b/GPU/Vulkan/ShaderManagerVulkan.cpp index a61ec30fce..18f7bf9192 100644 --- a/GPU/Vulkan/ShaderManagerVulkan.cpp +++ b/GPU/Vulkan/ShaderManagerVulkan.cpp @@ -187,7 +187,7 @@ uint32_t ShaderManagerVulkan::PushBoneBuffer(VulkanPushBuffer *dest, VkBuffer *b return dest->PushAligned(&ub_bones, sizeof(ub_bones), uboAlignment_, buf); } -void ShaderManagerVulkan::BaseUpdateUniforms(int dirtyUniforms) { +void ShaderManagerVulkan::BaseUpdateUniforms(uint64_t dirtyUniforms) { if (dirtyUniforms & DIRTY_TEXENV) { Uint8x3ToFloat4(ub_base.texEnvColor, gstate.texenvcolor); } @@ -337,7 +337,7 @@ void ShaderManagerVulkan::BaseUpdateUniforms(int dirtyUniforms) { } } -void ShaderManagerVulkan::LightUpdateUniforms(int dirtyUniforms) { +void ShaderManagerVulkan::LightUpdateUniforms(uint64_t dirtyUniforms) { // Lighting if (dirtyUniforms & DIRTY_AMBIENT) { Uint8x3ToFloat4_AlphaUint8(ub_lights.ambientColor, gstate.ambientcolor, gstate.getAmbientA()); @@ -380,7 +380,7 @@ void ShaderManagerVulkan::LightUpdateUniforms(int dirtyUniforms) { } } -void ShaderManagerVulkan::BoneUpdateUniforms(int dirtyUniforms) { +void ShaderManagerVulkan::BoneUpdateUniforms(uint64_t dirtyUniforms) { for (int i = 0; i < 8; i++) { if (dirtyUniforms & (DIRTY_BONEMATRIX0 << i)) { ConvertMatrix4x3To4x4(ub_bones.bones[i], gstate.boneMatrix + 12 * i); @@ -425,8 +425,8 @@ void ShaderManagerVulkan::DirtyLastShader() { // disables vertex arrays lastFShader_ = nullptr; } -uint32_t ShaderManagerVulkan::UpdateUniforms() { - uint32_t dirty = gstate_c.GetDirtyUniforms(); +uint64_t ShaderManagerVulkan::UpdateUniforms() { + uint64_t dirty = gstate_c.GetDirtyUniforms(); if (dirty != 0) { if (dirty & DIRTY_BASE_UNIFORMS) BaseUpdateUniforms(dirty); diff --git a/GPU/Vulkan/ShaderManagerVulkan.h b/GPU/Vulkan/ShaderManagerVulkan.h index ed5bae7191..aa185a0479 100644 --- a/GPU/Vulkan/ShaderManagerVulkan.h +++ b/GPU/Vulkan/ShaderManagerVulkan.h @@ -202,7 +202,7 @@ public: std::vector DebugGetShaderIDs(DebugShaderType type); std::string DebugGetShaderString(std::string id, DebugShaderType type, DebugShaderStringType stringType); - uint32_t UpdateUniforms(); + uint64_t UpdateUniforms(); // TODO: Avoid copying these buffers if same as last draw, can still point to it assuming we're still in the same pushbuffer. // Applies dirty changes and copies the buffer. @@ -215,9 +215,9 @@ public: uint32_t PushBoneBuffer(VulkanPushBuffer *dest, VkBuffer *buf); private: - void BaseUpdateUniforms(int dirtyUniforms); - void LightUpdateUniforms(int dirtyUniforms); - void BoneUpdateUniforms(int dirtyUniforms); + void BaseUpdateUniforms(uint64_t dirtyUniforms); + void LightUpdateUniforms(uint64_t dirtyUniforms); + void BoneUpdateUniforms(uint64_t dirtyUniforms); void Clear();