[virglrenderer-devel] [PATCH 5/8] vrend: Add geometry shaders on the GLES 3.1 host
Gert Wollny
gert.wollny at collabora.com
Sun Aug 5 14:46:00 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 | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index 501222b..1e59d59 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -165,7 +165,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 eaf82fe..e6d84a4 100644
--- a/src/vrend_shader.c
+++ b/src/vrend_shader.c
@@ -3943,6 +3943,9 @@ static char *emit_header(struct dump_ctx *ctx, char *glsl_hdr)
char buf[32];
snprintf(buf, sizeof(buf), "#version %d es\n", ctx->cfg->glsl_version);
STRCAT_WITH_RET(glsl_hdr, buf);
+ 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