summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/v3d/v3d_program.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c
index 759fac117f2..ef80069baab 100644
--- a/src/gallium/drivers/v3d/v3d_program.c
+++ b/src/gallium/drivers/v3d/v3d_program.c
@@ -373,8 +373,10 @@ v3d_get_compiled_shader(struct v3d_context *v3d, struct v3d_key *key)
v3d_set_shader_uniform_dirty_flags(shader);
- u_upload_data(v3d->state_uploader, 0, shader_size, 8,
- qpu_insts, &shader->offset, &shader->resource);
+ if (shader_size) {
+ u_upload_data(v3d->state_uploader, 0, shader_size, 8,
+ qpu_insts, &shader->offset, &shader->resource);
+ }
free(qpu_insts);