diff options
author | Dave Airlie <[email protected]> | 2018-08-29 08:32:29 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2018-09-10 12:23:30 +1000 |
commit | 240af6149477beb06fdcfc4b0295921448c0fe47 (patch) | |
tree | bf71141ba746a2b539dbf5d11e8b0c91ab00245a /src/gallium | |
parent | 14fe9fa11baa4e4e782d192e0b8c150ee9e8754f (diff) |
virgl: don't send a shader create with no data. (v2)
This fixes the situation where we'd send a shader with just the
header and no data.
piglit/glsl-max-varyings test was causing this to happen, and
the renderer fix was breaking it.
v2: drop fprintf
Fixes: a8987b88ff1d "virgl: add driver for virtio-gpu 3D (v2)"
Reviewed-by: Erik Faye-Lund <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_encode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c index d130e4059e6..e86d0711a57 100644 --- a/src/gallium/drivers/virgl/virgl_encode.c +++ b/src/gallium/drivers/virgl/virgl_encode.c @@ -288,7 +288,7 @@ int virgl_encode_shader_state(struct virgl_context *ctx, while (left_bytes) { uint32_t length, offlen; int hdr_len = base_hdr_size + (first_pass ? strm_hdr_size : 0); - if (ctx->cbuf->cdw + hdr_len + 1 > VIRGL_MAX_CMDBUF_DWORDS) + if (ctx->cbuf->cdw + hdr_len + 1 >= VIRGL_MAX_CMDBUF_DWORDS) ctx->base.flush(&ctx->base, NULL, 0); thispass = (VIRGL_MAX_CMDBUF_DWORDS - ctx->cbuf->cdw - hdr_len - 1) * 4; |