aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-02-22 13:09:26 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-22 13:09:26 -0800
commitbc2f4dfd4175bd35961092bbbbeccee77dc8aa04 (patch)
tree548d9b291816a26e860da252fb9cc91d1576f05b /src
parentf853594cc10993e618a5ec80693e01e0e05af536 (diff)
fix unsigned/signed warning on linux for GrVkDescriptorPool::numPoolSizes()
Diffstat (limited to 'src')
-rw-r--r--src/gpu/vk/GrVkDescriptorPool.cpp6
-rw-r--r--src/gpu/vk/GrVkDescriptorPool.h5
2 files changed, 5 insertions, 6 deletions
diff --git a/src/gpu/vk/GrVkDescriptorPool.cpp b/src/gpu/vk/GrVkDescriptorPool.cpp
index d4dced6c32..48880b64db 100644
--- a/src/gpu/vk/GrVkDescriptorPool.cpp
+++ b/src/gpu/vk/GrVkDescriptorPool.cpp
@@ -14,7 +14,7 @@
GrVkDescriptorPool::GrVkDescriptorPool(const GrVkGpu* gpu, const DescriptorTypeCounts& typeCounts)
: INHERITED()
, fTypeCounts(typeCounts) {
- uint32_t numPools = fTypeCounts.numPoolSizes();
+ int numPools = fTypeCounts.numPoolSizes();
SkAutoTDeleteArray<VkDescriptorPoolSize> poolSizes(new VkDescriptorPoolSize[numPools]);
int currentPool = 0;
for (int i = VK_DESCRIPTOR_TYPE_BEGIN_RANGE; i < VK_DESCRIPTOR_TYPE_END_RANGE; ++i) {
@@ -57,8 +57,8 @@ void GrVkDescriptorPool::freeGPUData(const GrVkGpu* gpu) const {
///////////////////////////////////////////////////////////////////////////////
-uint32_t GrVkDescriptorPool::DescriptorTypeCounts::numPoolSizes() const {
- uint32_t count = 0;
+int GrVkDescriptorPool::DescriptorTypeCounts::numPoolSizes() const {
+ int count = 0;
for (int i = VK_DESCRIPTOR_TYPE_BEGIN_RANGE; i < VK_DESCRIPTOR_TYPE_END_RANGE; ++i) {
count += fDescriptorTypeCount[i] ? 1 : 0;
}
diff --git a/src/gpu/vk/GrVkDescriptorPool.h b/src/gpu/vk/GrVkDescriptorPool.h
index ebbf230708..b20b01827c 100644
--- a/src/gpu/vk/GrVkDescriptorPool.h
+++ b/src/gpu/vk/GrVkDescriptorPool.h
@@ -23,7 +23,7 @@ public:
}
void setTypeCount(VkDescriptorType type, uint8_t count);
- uint32_t numPoolSizes() const;
+ int numPoolSizes() const;
// Determines if for each i, that.fDescriptorTypeCount[i] <= fDescriptorTypeCount[i];
bool isSuperSet(const DescriptorTypeCounts& that) const;
@@ -52,5 +52,4 @@ private:
typedef GrVkResource INHERITED;
};
-
-#endif \ No newline at end of file
+#endif