mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-05 15:48:51 +00:00
yay, UBOs work 100% now.
This commit is contained in:
parent
1f75ee49bf
commit
d4a80ca3ec
6 changed files with 66 additions and 99 deletions
|
@ -527,7 +527,7 @@ const char* WriteBinding(API_TYPE ApiType, const u32 num)
|
|||
}
|
||||
const char *WriteLocation(API_TYPE ApiType)
|
||||
{
|
||||
if(ApiType == API_GLSL && g_ActiveConfig.backend_info.bSupportsGLSLUBO)
|
||||
if(ApiType == API_GLSL && !g_ActiveConfig.backend_info.bSupportsGLSLUBO)
|
||||
return "";
|
||||
static char result[64];
|
||||
sprintf(result, "uniform ");
|
||||
|
@ -620,7 +620,7 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
|
|||
|
||||
WRITE(p, "\n");
|
||||
if(ApiType == API_GLSL && g_ActiveConfig.backend_info.bSupportsGLSLUBO)
|
||||
WRITE(p, "layout(std140, binding = 0) uniform PSBlock {\n");
|
||||
WRITE(p, "layout(std140, binding = 1) uniform PSBlock {\n");
|
||||
|
||||
WRITE(p, "%sfloat4 "I_COLORS"[4] %s;\n", WriteLocation(ApiType), WriteRegister(ApiType, "c", C_COLORS));
|
||||
WRITE(p, "%sfloat4 "I_KCOLORS"[4] %s;\n", WriteLocation(ApiType), WriteRegister(ApiType, "c", C_KCOLORS));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue