[virglrenderer-devel] [PATCH] shader: only write all cbufs after use ones.
Dave Airlie
airlied at gmail.com
Fri May 18 02:09:30 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 134d29b..a696320 100644
--- a/src/vrend_shader.c
+++ b/src/vrend_shader.c
@@ -988,7 +988,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