mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
r300: fix cycles calculation
There might be more texture semaphores per begin tex block, just do the cycles calculation on the first one. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24250>
This commit is contained in:
parent
2007d67054
commit
c9a0e91d4c
1 changed files with 5 additions and 3 deletions
|
|
@ -358,7 +358,7 @@ void rc_get_stats(struct radeon_compiler *c, struct rc_program_stats *s)
|
|||
struct rc_instruction * tmp;
|
||||
memset(s, 0, sizeof(*s));
|
||||
unsigned ip = 0;
|
||||
unsigned last_begintex = 0;
|
||||
int last_begintex = -1;
|
||||
|
||||
for(tmp = c->Program.Instructions.Next; tmp != &c->Program.Instructions;
|
||||
tmp = tmp->Next, ip++){
|
||||
|
|
@ -399,8 +399,10 @@ void rc_get_stats(struct radeon_compiler *c, struct rc_program_stats *s)
|
|||
/* SemWait has effect only on R500, the more instructions we can put
|
||||
* between the tex block and the first texture semaphore, the better.
|
||||
*/
|
||||
if (tmp->U.P.SemWait && c->is_r500)
|
||||
s->num_cycles -= ip - last_begintex;
|
||||
if (tmp->U.P.SemWait && c->is_r500 && last_begintex != -1) {
|
||||
s->num_cycles -= MIN2(30, ip - last_begintex);
|
||||
last_begintex = -1;
|
||||
}
|
||||
info = rc_get_opcode_info(tmp->U.P.RGB.Opcode);
|
||||
}
|
||||
if (info->IsFlowControl) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue