mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 13:55:38 +00:00
GPU: Fix warnings in RGB24 shader
This commit is contained in:
parent
e80775ed82
commit
1998a74ff4
|
@ -405,31 +405,30 @@ void main()
|
|||
|
||||
// select the bit for this pixel depending on its offset in the 4-pixel block
|
||||
uint r, g, b;
|
||||
switch (xoff & 3)
|
||||
int block_offset = xoff & 3;
|
||||
if (block_offset == 0)
|
||||
{
|
||||
case 0:
|
||||
r = s0 & 0xFFu;
|
||||
g = s0 >> 8;
|
||||
b = s1 & 0xFFu;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
r = s1 >> 8;
|
||||
g = s2 & 0xFFu;
|
||||
b = s2 >> 8;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
r = s1 & 0xFFu;
|
||||
g = s1 >> 8;
|
||||
b = s2 & 0xFFu;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
r = s2 >> 8;
|
||||
g = s3 & 0xFFu;
|
||||
b = s3 >> 8;
|
||||
break;
|
||||
r = s0 & 0xFFu;
|
||||
g = s0 >> 8;
|
||||
b = s1 & 0xFFu;
|
||||
}
|
||||
else if (block_offset == 1)
|
||||
{
|
||||
r = s1 >> 8;
|
||||
g = s2 & 0xFFu;
|
||||
b = s2 >> 8;
|
||||
}
|
||||
else if (block_offset == 2)
|
||||
{
|
||||
r = s1 & 0xFFu;
|
||||
g = s1 >> 8;
|
||||
b = s2 & 0xFFu;
|
||||
}
|
||||
else
|
||||
{
|
||||
r = s2 >> 8;
|
||||
g = s3 & 0xFFu;
|
||||
b = s3 >> 8;
|
||||
}
|
||||
|
||||
// and normalize
|
||||
|
|
|
@ -86,9 +86,9 @@ static int Run(int argc, char* argv[])
|
|||
int main(int argc, char* argv[])
|
||||
{
|
||||
// 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 InterruptController", LOGLEVEL_DEBUG);
|
||||
// g_pLog->SetConsoleOutputParams(true, "GPU GPU_HW_OpenGL SPU Pad DigitalController InterruptController", LOGLEVEL_DEBUG);
|
||||
|
||||
#ifdef Y_BUILD_CONFIG_RELEASE
|
||||
g_pLog->SetFilterLevel(LOGLEVEL_INFO);
|
||||
|
|
Loading…
Reference in a new issue