GPU: Support clip and cull distances separately.

Older GL devices, and it seems Apple devices, may not support cull.
This commit is contained in:
Unknown W. Brackets committed 2021-10-12 20:34:44 -07:00
1 parent 7b00c4a572
commit 33598f2e75
6 files changed
+23 -12

No files matched your search

+1 -1
View File
@@ -183,7 +183,7 @@ LinkedShader::LinkedShader(GLRenderManager *render, VShaderID VSID, Shader *vs,
initialize.push_back({ &u_tess_weights_v, 0, 6 });
bool useDualSource = (gstate_c.featureFlags & GPU_SUPPORTS_DUALSOURCE_BLEND) != 0;
bool useClip0 = VSID.Bit(VS_BIT_VERTEX_RANGE_CULLING) && gstate_c.Supports(GPU_SUPPORTS_CLIP_CULL_DISTANCE);
bool useClip0 = VSID.Bit(VS_BIT_VERTEX_RANGE_CULLING) && gstate_c.Supports(GPU_SUPPORTS_CLIP_DISTANCE);
program = render->CreateProgram(shaders, semantics, queries, initialize, useDualSource, useClip0);
// The rest, use the "dirty" mechanism.