diff options
author | Rob Clark <[email protected]> | 2015-06-01 12:35:19 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-06-21 07:54:31 -0400 |
commit | 660d5c1646f5d63f9626b24beabc9cfc318849d4 (patch) | |
tree | f6bed9e09bfda2d04c5fdde9712f366378ff6896 /src/gallium/drivers/freedreno/ir3/ir3.c | |
parent | d646d3ae9d221104db0e9daec33ef470b1bdd957 (diff) |
freedreno/ir3: a4xx encodes larger immed offset
Without this, negative branch/jump offsets look like very large positive
offsets.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3/ir3.c')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3.c b/src/gallium/drivers/freedreno/ir3/ir3.c index 7515b79b0c9..ba5851c6c82 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3.c +++ b/src/gallium/drivers/freedreno/ir3/ir3.c @@ -152,7 +152,11 @@ static int emit_cat0(struct ir3_instruction *instr, void *ptr, { instr_cat0_t *cat0 = ptr; - cat0->immed = instr->cat0.immed; + if (info->gpu_id >= 400) { + cat0->a4xx.immed = instr->cat0.immed; + } else { + cat0->a3xx.immed = instr->cat0.immed; + } cat0->repeat = instr->repeat; cat0->ss = !!(instr->flags & IR3_INSTR_SS); cat0->inv = instr->cat0.inv; @@ -547,6 +551,7 @@ void * ir3_assemble(struct ir3 *shader, struct ir3_info *info, struct ir3_block *block = shader->block; uint32_t *ptr, *dwords; + info->gpu_id = gpu_id; info->max_reg = -1; info->max_half_reg = -1; info->max_const = -1; |