GPU: Fix warnings in RGB24 shader

This commit is contained in:
Connor McLaughlin 2019-10-05 14:52:52 +10:00
parent e80775ed82
commit 1998a74ff4
2 changed files with 25 additions and 26 deletions

View file

@ -405,31 +405,30 @@ void main()
// select the bit for this pixel depending on its offset in the 4-pixel block // select the bit for this pixel depending on its offset in the 4-pixel block
uint r, g, b; uint r, g, b;
switch (xoff & 3) int block_offset = xoff & 3;
if (block_offset == 0)
{ {
case 0:
r = s0 & 0xFFu; r = s0 & 0xFFu;
g = s0 >> 8; g = s0 >> 8;
b = s1 & 0xFFu; b = s1 & 0xFFu;
break; }
else if (block_offset == 1)
case 1: {
r = s1 >> 8; r = s1 >> 8;
g = s2 & 0xFFu; g = s2 & 0xFFu;
b = s2 >> 8; b = s2 >> 8;
break; }
else if (block_offset == 2)
case 2: {
r = s1 & 0xFFu; r = s1 & 0xFFu;
g = s1 >> 8; g = s1 >> 8;
b = s2 & 0xFFu; b = s2 & 0xFFu;
break; }
else
case 3: {
r = s2 >> 8; r = s2 >> 8;
g = s3 & 0xFFu; g = s3 & 0xFFu;
b = s3 >> 8; b = s3 >> 8;
break;
} }
// and normalize // and normalize

View file

@ -86,9 +86,9 @@ static int Run(int argc, char* argv[])
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
// set log flags // set log flags
// g_pLog->SetConsoleOutputParams(true, nullptr, LOGLEVEL_DEBUG); g_pLog->SetConsoleOutputParams(true, nullptr, LOGLEVEL_DEBUG);
// g_pLog->SetConsoleOutputParams(true, "GPU GPU_HW_OpenGL SPU Pad DigitalController", LOGLEVEL_DEBUG); // g_pLog->SetConsoleOutputParams(true, "GPU GPU_HW_OpenGL SPU Pad DigitalController", LOGLEVEL_DEBUG);
g_pLog->SetConsoleOutputParams(true, "GPU GPU_HW_OpenGL SPU Pad DigitalController InterruptController", LOGLEVEL_DEBUG); // g_pLog->SetConsoleOutputParams(true, "GPU GPU_HW_OpenGL SPU Pad DigitalController InterruptController", LOGLEVEL_DEBUG);
#ifdef Y_BUILD_CONFIG_RELEASE #ifdef Y_BUILD_CONFIG_RELEASE
g_pLog->SetFilterLevel(LOGLEVEL_INFO); g_pLog->SetFilterLevel(LOGLEVEL_INFO);