mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-26 03:35:27 +00:00
Vulkan: Forgot to extend a few more dirtyflag variables to 64-bit. Avoid a warning.
This commit is contained in:
parent
62a171c616
commit
e17d3e1e7a
@ -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;
|
||||
};
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -202,7 +202,7 @@ public:
|
||||
std::vector<std::string> 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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user