mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
freedreno/ir3: Stop pushing immediates once we've filled the constbuf.
If we filled the constbuf up with UBOs, we may need to avoid generating more immediate push constants. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5273>
This commit is contained in:
parent
ab29f2da42
commit
07ec745014
1 changed files with 8 additions and 1 deletions
|
|
@ -383,7 +383,14 @@ lower_immed(struct ir3_cp_ctx *ctx, struct ir3_instruction *instr, unsigned n,
|
|||
}
|
||||
|
||||
if (i == const_state->immediate_idx) {
|
||||
/* need to generate a new immediate: */
|
||||
struct ir3_compiler *compiler = instr->block->shader->compiler;
|
||||
/* Add on a new immediate to be pushed, if we have space left in the
|
||||
* constbuf.
|
||||
*/
|
||||
if (const_state->offsets.immediate + const_state->immediate_idx / 4 >=
|
||||
compiler->max_const)
|
||||
return false;
|
||||
|
||||
swiz = i % 4;
|
||||
idx = i / 4;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue