diff options
author | Rob Clark <[email protected]> | 2014-10-18 15:28:16 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2014-10-20 21:42:44 -0400 |
commit | 8a0ffedd8de51eaf980855283c4525dba6dc5847 (patch) | |
tree | 91b1a9e527826679fac39959538678896a4c4328 /src/gallium/drivers/freedreno/ir3/ir3.c | |
parent | ab33a240890a7ef147d4b8cf35c27ae1932a1dbe (diff) |
freedreno/ir3: fix potential gpu lockup with kill
It seems like the hardware is unhappy if we execute a kill instruction
prior to last input (ei). Probably the shader thread stops executing
and the end-input flag is never set.
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 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3.c b/src/gallium/drivers/freedreno/ir3/ir3.c index 70d37ffdeb5..60d4e4a15d5 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3.c +++ b/src/gallium/drivers/freedreno/ir3/ir3.c @@ -81,6 +81,8 @@ void ir3_destroy(struct ir3 *shader) shader->chunk = chunk->next; free(chunk); } + free(shader->instrs); + free(shader->baryfs); free(shader); } @@ -596,6 +598,15 @@ static void insert_instr(struct ir3 *shader, shader->instrs_sz * sizeof(shader->instrs[0])); } shader->instrs[shader->instrs_count++] = instr; + + if (is_input(instr)) { + if (shader->baryfs_count == shader->baryfs_sz) { + shader->baryfs_sz = MAX2(2 * shader->baryfs_sz, 16); + shader->baryfs = realloc(shader->baryfs, + shader->baryfs_sz * sizeof(shader->baryfs[0])); + } + shader->baryfs[shader->baryfs_count++] = instr; + } } struct ir3_block * ir3_block_create(struct ir3 *shader, |