mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 21:16:24 +02:00
Shadergen fix for OpenGL
This commit is contained in:
1 parent
1da6d29a0f
commit
e058f8aee6
2 files changed
+7
-2
No files matched your search
@@ -113,6 +113,10 @@ bool GenerateFragmentShader(const FShaderID &id, char *buffer, const ShaderLangu
|
||||
*errorString = "Invalid combination of 3D texture and array texture, shouldn't happen";
|
||||
return false;
|
||||
}
|
||||
if (compat.shaderLanguage != ShaderLanguage::GLSL_VULKAN && arrayTexture) {
|
||||
*errorString = "We only do array textures for framebuffers in Vulkan.";
|
||||
return false;
|
||||
}
|
||||
|
||||
bool flatBug = bugs.Has(Draw::Bugs::BROKEN_FLAT_IN_SHADER) && g_Config.bVendorBugChecksEnabled;
|
||||
|
||||
@@ -660,6 +664,7 @@ bool GenerateFragmentShader(const FShaderID &id, char *buffer, const ShaderLangu
|
||||
WRITE(p, " vec4 t = %s(tex, vec3(%s.xy, u_mipBias));\n", compat.texture3D, texcoord);
|
||||
}
|
||||
} else if (arrayTexture) {
|
||||
_dbg_assert_(compat.shaderLanguage == GLSL_VULKAN);
|
||||
// Used for stereo rendering.
|
||||
const char *arrayIndex = useStereo ? "float(gl_ViewIndex)" : "0.0";
|
||||
if (doTextureProjection) {
|
||||
|
||||
@@ -368,8 +368,8 @@ void ComputeFragmentShaderID(FShaderID *id_out, const ComputedPipelineState &pip
|
||||
id.SetBit(FS_BIT_FLATSHADE, doFlatShading);
|
||||
id.SetBit(FS_BIT_COLOR_WRITEMASK, colorWriteMask);
|
||||
|
||||
// All framebuffers are array textures now.
|
||||
if (gstate_c.arrayTexture) {
|
||||
// All framebuffers are array textures in Vulkan now.
|
||||
if (gstate_c.arrayTexture && g_Config.iGPUBackend == (int)GPUBackend::VULKAN) {
|
||||
id.SetBit(FS_BIT_SAMPLE_ARRAY_TEXTURE);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user