mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-22 21:55:52 +00:00
Add flags to ResourceFormat to replace bgraOrder/srgbCorrected
* Allows for future expansion as well
This commit is contained in:
@@ -551,7 +551,7 @@ QVariantList FormatElement::GetVariants(const byte *&data, const byte *end) cons
|
||||
ret.push_back((float)((packed >> 10) & 0x1f) / 31.0f);
|
||||
ret.push_back(((packed & 0x8000) > 0) ? 1.0f : 0.0f);
|
||||
|
||||
if(format.bgraOrder)
|
||||
if(format.bgraOrder())
|
||||
{
|
||||
QVariant tmp = ret[2];
|
||||
ret[2] = ret[0];
|
||||
@@ -566,7 +566,7 @@ QVariantList FormatElement::GetVariants(const byte *&data, const byte *end) cons
|
||||
ret.push_back((float)((packed >> 5) & 0x3f) / 63.0f);
|
||||
ret.push_back((float)((packed >> 11) & 0x1f) / 31.0f);
|
||||
|
||||
if(format.bgraOrder)
|
||||
if(format.bgraOrder())
|
||||
{
|
||||
QVariant tmp = ret[2];
|
||||
ret[2] = ret[0];
|
||||
@@ -582,7 +582,7 @@ QVariantList FormatElement::GetVariants(const byte *&data, const byte *end) cons
|
||||
ret.push_back((float)((packed >> 8) & 0xf) / 15.0f);
|
||||
ret.push_back((float)((packed >> 12) & 0xf) / 15.0f);
|
||||
|
||||
if(format.bgraOrder)
|
||||
if(format.bgraOrder())
|
||||
{
|
||||
QVariant tmp = ret[2];
|
||||
ret[2] = ret[0];
|
||||
@@ -601,7 +601,7 @@ QVariantList FormatElement::GetVariants(const byte *&data, const byte *end) cons
|
||||
uint32_t b = (packed >> 20) & 0x3ff;
|
||||
uint32_t a = (packed >> 30) & 0x003;
|
||||
|
||||
if(format.bgraOrder)
|
||||
if(format.bgraOrder())
|
||||
{
|
||||
uint32_t tmp = b;
|
||||
b = r;
|
||||
@@ -835,7 +835,7 @@ QVariantList FormatElement::GetVariants(const byte *&data, const byte *end) cons
|
||||
}
|
||||
}
|
||||
|
||||
if(format.bgraOrder)
|
||||
if(format.bgraOrder())
|
||||
{
|
||||
QVariant tmp = ret[2];
|
||||
ret[2] = ret[0];
|
||||
|
||||
Reference in New Issue
Block a user