[virglrenderer-devel] [RFC PATCH 5/5] vrend: Add geometry shaders on the GLES 3.1 host
Gert Wollny
gert.wollny at collabora.com
Thu Aug 2 08:48:27 UTC 2018
This is needed to make tests/test_virgl_cmd pass
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
src/vrend_renderer.c | 2 +-
src/vrend_shader.c | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index c6181d2..9182c81 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -164,7 +164,7 @@ static const struct {
[feat_dual_src_blend] = { 33, UNAVAIL, { "GL_ARB_blend_func_extended" } },
[feat_fb_no_attach] = { 43, 31, { "GL_ARB_framebuffer_no_attachments" } },
[feat_framebuffer_fetch] = { UNAVAIL, UNAVAIL, { "GL_EXT_shader_framebuffer_fetch" } },
- [feat_geometry_shader] = { 32, UNAVAIL, {} },
+ [feat_geometry_shader] = { 32, 32, {"GL_EXT_geometry_shader", "GL_OES_geometry_shader"} },
[feat_gl_conditional_render] = { 30, UNAVAIL, {} },
[feat_gl_prim_restart] = { 31, 30, {} },
[feat_gles_khr_robustness] = { UNAVAIL, UNAVAIL, { "GL_KHR_robustness" } },
diff --git a/src/vrend_shader.c b/src/vrend_shader.c
index 55c9579..679623c 100644
--- a/src/vrend_shader.c
+++ b/src/vrend_shader.c
@@ -3938,7 +3938,10 @@ prolog(struct tgsi_iterate_context *iter)
static char *emit_header(struct dump_ctx *ctx, char *glsl_hdr)
{
if (ctx->cfg->use_gles) {
- STRCAT_WITH_RET(glsl_hdr, "#version 300 es\n");
+ STRCAT_WITH_RET(glsl_hdr, "#version 310 es\n");
+ if (ctx->prog_type == TGSI_PROCESSOR_GEOMETRY) {
+ STRCAT_WITH_RET(glsl_hdr, "#extension GL_EXT_geometry_shader : require\n");
+ }
PAD_GPU_SHADER5(glsl_hdr);
STRCAT_WITH_RET(glsl_hdr, "precision highp float;\n");
STRCAT_WITH_RET(glsl_hdr, "precision highp int;\n");
--
2.17.1
More information about the virglrenderer-devel
mailing list