mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
Pass ptr to local memory copy instead of main memory to exec_instruction
This was essentially a cut-and-paste bug when the instruction fetcher was added. Also, the test for TGSI_PROCESSOR_FRAGMENT was moved outside the loop for exec_declaration.
This commit is contained in:
parent
3d13605ee5
commit
fcf9441773
1 changed files with 12 additions and 10 deletions
|
|
@ -2332,17 +2332,19 @@ spu_exec_machine_run( struct spu_exec_machine *mach )
|
||||||
|
|
||||||
|
|
||||||
/* execute declarations (interpolants) */
|
/* execute declarations (interpolants) */
|
||||||
for (i = 0; i < mach->NumDeclarations; i++) {
|
if( mach->Processor == TGSI_PROCESSOR_FRAGMENT ) {
|
||||||
uint8_t buffer[sizeof(struct tgsi_full_declaration) + 32] ALIGN16_ATTRIB;
|
for (i = 0; i < mach->NumDeclarations; i++) {
|
||||||
struct tgsi_full_declaration decl;
|
uint8_t buffer[sizeof(struct tgsi_full_declaration) + 32] ALIGN16_ATTRIB;
|
||||||
unsigned long decl_addr = (unsigned long) (mach->Declarations+i);
|
struct tgsi_full_declaration decl;
|
||||||
unsigned size = ((sizeof(decl) + (decl_addr & 0x0f) + 0x0f) & ~0x0f);
|
unsigned long decl_addr = (unsigned long) (mach->Declarations+i);
|
||||||
|
unsigned size = ((sizeof(decl) + (decl_addr & 0x0f) + 0x0f) & ~0x0f);
|
||||||
|
|
||||||
mfc_get(buffer, decl_addr & ~0x0f, size, TAG_INSTRUCTION_FETCH, 0, 0);
|
mfc_get(buffer, decl_addr & ~0x0f, size, TAG_INSTRUCTION_FETCH, 0, 0);
|
||||||
wait_on_mask(1 << TAG_INSTRUCTION_FETCH);
|
wait_on_mask(1 << TAG_INSTRUCTION_FETCH);
|
||||||
|
|
||||||
memcpy(& decl, buffer + (decl_addr & 0x0f), sizeof(decl));
|
memcpy(& decl, buffer + (decl_addr & 0x0f), sizeof(decl));
|
||||||
exec_declaration( mach, mach->Declarations+i );
|
exec_declaration( mach, decl );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* execute instructions, until pc is set to -1 */
|
/* execute instructions, until pc is set to -1 */
|
||||||
|
|
@ -2357,7 +2359,7 @@ spu_exec_machine_run( struct spu_exec_machine *mach )
|
||||||
wait_on_mask(1 << TAG_INSTRUCTION_FETCH);
|
wait_on_mask(1 << TAG_INSTRUCTION_FETCH);
|
||||||
|
|
||||||
memcpy(& inst, buffer + (inst_addr & 0x0f), sizeof(inst));
|
memcpy(& inst, buffer + (inst_addr & 0x0f), sizeof(inst));
|
||||||
exec_instruction( mach, mach->Instructions + pc, &pc );
|
exec_instruction( mach, & inst, &pc );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue