Minor refactor of ShaderWriter flags. Extracted from the stereo PR
This commit is contained in:
parent
a13ab3f76b
commit
ecf2797173
7 changed files with 39 additions and 33 deletions
|
@ -39,16 +39,16 @@
|
|||
|
||||
|
||||
bool GenerateGeometryShader(const GShaderID &id, char *buffer, const ShaderLanguageDesc &compat, const Draw::Bugs bugs, std::string *errorString) {
|
||||
std::vector<const char*> gl_exts;
|
||||
std::vector<const char*> extensions;
|
||||
if (ShaderLanguageIsOpenGL(compat.shaderLanguage)) {
|
||||
if (gl_extensions.EXT_gpu_shader4) {
|
||||
gl_exts.push_back("#extension GL_EXT_gpu_shader4 : enable");
|
||||
extensions.push_back("#extension GL_EXT_gpu_shader4 : enable");
|
||||
}
|
||||
}
|
||||
bool vertexRangeCulling = !id.Bit(GS_BIT_CURVE);
|
||||
bool clipClampedDepth = gstate_c.Use(GPU_USE_DEPTH_CLAMP);
|
||||
|
||||
ShaderWriter p(buffer, compat, ShaderStage::Geometry, gl_exts);
|
||||
ShaderWriter p(buffer, compat, ShaderStage::Geometry, extensions);
|
||||
p.C("layout(triangles) in;\n");
|
||||
if (clipClampedDepth && vertexRangeCulling && !gstate_c.Use(GPU_USE_CLIP_DISTANCE)) {
|
||||
p.C("layout(triangle_strip, max_vertices = 12) out;\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue