Fix compile warning and forgetting to use a constant in previous change

This commit is contained in:
danginsburg 2020-05-21 14:13:20 -04:00
parent 027b66ef5c
commit d9da5c746e
2 changed files with 3 additions and 3 deletions

View File

@ -228,12 +228,12 @@ public:
protected:
id<MTLCommandBuffer> getMTLCommandBuffer();
typedef struct PresentInfo {
typedef struct {
MVKPresentableSwapchainImage* presentableImage;
bool hasPresentTime; // Keep track of whether present included VK_GOOGLE_display_timing
uint32_t presentID; // VK_GOOGLE_display_timing presentID
uint64_t desiredPresentTime; // VK_GOOGLE_display_timing desired presentation time in nanoseconds
};
} PresentInfo;
MVKVectorInline<PresentInfo, 4> _presentInfo;
};

View File

@ -125,7 +125,7 @@ protected:
std::atomic<bool> _surfaceLost;
MVKBlockObserver* _layerObserver;
static const int kMaxPresentationHistory = 60;
VkPastPresentationTimingGOOGLE _presentTimingHistory[60];
VkPastPresentationTimingGOOGLE _presentTimingHistory[kMaxPresentationHistory];
uint32_t _presentHistoryCount;
uint32_t _presentHistoryIndex;
uint32_t _presentHistoryHeadIndex;