From bbfbf4c6fdd8e52fe2babc4a8cb5419410f380b4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 28 Dec 2017 17:33:06 -0500 Subject: [PATCH] picasso: Mark member functions of DVLEData as const These only query state about the data, they don't modify it --- source/picasso.h | 6 +++--- source/picasso_assembler.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/picasso.h b/source/picasso.h index 2a95c6e..7fdf008 100644 --- a/source/picasso.h +++ b/source/picasso.h @@ -226,8 +226,8 @@ struct DVLEData u32 outputUsedReg; int outputCount; - bool usesGshSpace() { return isGeoShader && !isCompatGeoShader; } - int findFreeOutput() + bool usesGshSpace() const { return isGeoShader && !isCompatGeoShader; } + int findFreeOutput() const { for (int i = 0; i < maxOutputReg(); i ++) if (!(outputMask & BIT(i))) @@ -235,7 +235,7 @@ struct DVLEData return -1; } - int findFreeInput() + int findFreeInput() const { for (int i = 0; i < 16; i ++) if (!(inputMask & BIT(i))) diff --git a/source/picasso_assembler.cpp b/source/picasso_assembler.cpp index 8742542..ab72fda 100644 --- a/source/picasso_assembler.cpp +++ b/source/picasso_assembler.cpp @@ -81,7 +81,7 @@ struct UniformAllocBundle static UniformAllocBundle unifAlloc[2]; -static inline UniformAlloc& getAlloc(int type, DVLEData* dvle) +static inline UniformAlloc& getAlloc(int type, const DVLEData* dvle) { int x = dvle->usesGshSpace(); switch (type)