Commit 3bb14a39 authored by Gert Wollny's avatar Gert Wollny Committed by Jakob Bornecrantz

vrend: Also set glsl to at least 400 on D-GL when certain extension are available

When the host GL version is < 4.0 then the GLSL shader language level is set
to a value below 400, but if geometry shaders, tesselation shaders, and the
gpu_shader5 are supported, then we can expect that the GLSL language level
400 is actually supported, so advertice it also on a GL host.
Tested-by: Jakob Bornecrantz's avatarJakob Bornecrantz <jakob@collabora.com>
Reviewed-by: 's avatarGurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: 's avatarGert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz's avatarJakob Bornecrantz <jakob@collabora.com>
parent b7eccdf4
Pipeline #3135 failed with stages
......@@ -8024,17 +8024,8 @@ static void vrend_fill_caps_glsl_version(int gl_ver, int gles_ver,
if (gles_ver > 0) {
caps->v1.glsl_level = 120;
if (gles_ver >= 31) {
if (gles_ver >= 31)
caps->v1.glsl_level = 310;
if (has_feature(feat_tessellation) &&
has_feature(feat_geometry_shader) &&
has_feature(feat_gpu_shader5))
/* This is probably a lie, but Gallium enables
* OES_geometry_shader and ARB_gpu_shader5
* based on this value, apart from that it doesn't
* seem to be a crucial value */
caps->v1.glsl_level = 400;
}
else if (gles_ver >= 30)
caps->v1.glsl_level = 130;
}
......@@ -8057,6 +8048,17 @@ static void vrend_fill_caps_glsl_version(int gl_ver, int gles_ver,
else if (gl_ver >= 43)
caps->v1.glsl_level = 430;
}
if (caps->v1.glsl_level < 400) {
if (has_feature(feat_tessellation) &&
has_feature(feat_geometry_shader) &&
has_feature(feat_gpu_shader5))
/* This is probably a lie, but Gallium enables
* OES_geometry_shader and ARB_gpu_shader5
* based on this value, apart from that it doesn't
* seem to be a crucial value */
caps->v1.glsl_level = 400;
}
}
/*
......@@ -8500,6 +8502,8 @@ void vrend_renderer_fill_caps(uint32_t set, UNUSED uint32_t version,
}
vrend_fill_caps_glsl_version(gl_ver, gles_ver, caps);
VREND_DEBUG(dbg_features, NULL, "GLSL support level: %d", caps->v1.glsl_level);
vrend_renderer_fill_caps_v1(gl_ver, gles_ver, caps);
if (!fill_capset2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment