[virglrenderer-devel] [PATCH 2/2] shader: only write all cbufs after use ones.
Dave Airlie
airlied at gmail.com
Mon May 21 02:42:57 UTC 2018
From: Dave Airlie <airlied at redhat.com>
Some shaders seem to set this flag when dual-src is enabled,
we don't want to trash the cbuf1 write in that case.
---
src/vrend_shader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vrend_shader.c b/src/vrend_shader.c
index 212f01e..816a578 100644
--- a/src/vrend_shader.c
+++ b/src/vrend_shader.c
@@ -885,7 +885,7 @@ static int emit_cbuf_writes(struct dump_ctx *ctx)
int i;
char *sret;
- for (i = 1; i < 8; i++) {
+ for (i = ctx->num_outputs; i < 8; i++) {
snprintf(buf, 255, "fsout_c%d = fsout_c0;\n", i);
sret = add_str_to_glsl_main(ctx, buf);
if (!sret)
--
2.14.3
More information about the virglrenderer-devel
mailing list