mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
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:a8987b88ff"virgl: add driver for virtio-gpu 3D (v2)" Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> (cherry picked from commit240af61494)
This commit is contained in:
parent
05985a643d
commit
4670daa12d
1 changed files with 1 additions and 1 deletions
|
|
@ -283,7 +283,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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue