summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/ir-a2xx.c2
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3.c2
-rw-r--r--src/gallium/drivers/r600/r600_asm.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/ir-a2xx.c b/src/gallium/drivers/freedreno/a2xx/ir-a2xx.c
index 18afba8a5a3..cff5a27fce0 100644
--- a/src/gallium/drivers/freedreno/a2xx/ir-a2xx.c
+++ b/src/gallium/drivers/freedreno/a2xx/ir-a2xx.c
@@ -146,7 +146,7 @@ void * ir2_shader_assemble(struct ir2_shader *shader, struct ir2_shader_info *in
goto fail;
}
- ptr = dwords = calloc(1, 4 * info->sizedwords);
+ ptr = dwords = calloc(4, info->sizedwords);
/* second pass, emit CF program in pairs: */
for (i = 0; i < shader->cfs_count; i += 2) {
diff --git a/src/gallium/drivers/freedreno/ir3/ir3.c b/src/gallium/drivers/freedreno/ir3/ir3.c
index ea2a9251b28..3da10fb81e3 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3.c
@@ -554,7 +554,7 @@ void * ir3_assemble(struct ir3 *shader, struct ir3_info *info)
*/
info->sizedwords = 2 * align(shader->instrs_count, 4);
- ptr = dwords = calloc(1, 4 * info->sizedwords);
+ ptr = dwords = calloc(4, info->sizedwords);
for (i = 0; i < shader->instrs_count; i++) {
struct ir3_instruction *instr = shader->instrs[i];
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index 4da918c9f31..8aa69b506a7 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -1590,7 +1590,7 @@ int r600_bytecode_build(struct r600_bytecode *bc)
bc->ndw = cf->addr + cf->ndw;
}
free(bc->bytecode);
- bc->bytecode = calloc(1, bc->ndw * 4);
+ bc->bytecode = calloc(4, bc->ndw);
if (bc->bytecode == NULL)
return -ENOMEM;
LIST_FOR_EACH_ENTRY(cf, &bc->cf, list) {