Fixed Voodoo recompiler texture clamping.
This commit is contained in:
parent
eb96970fb2
commit
d268d3558b
2 changed files with 6 additions and 9 deletions
|
|
@ -434,7 +434,7 @@ static inline int codegen_texture_fetch(uint8_t *code_block, voodoo_t *voodoo, v
|
|||
addbyte(0x0c);
|
||||
addbyte(0x82);
|
||||
|
||||
if (state->clamp_s)
|
||||
if (state->clamp_s[tmu])
|
||||
{
|
||||
addbyte(0xeb); /*JMP +*/
|
||||
addbyte(5+5+4+4);
|
||||
|
|
@ -607,7 +607,7 @@ static inline int codegen_texture_fetch(uint8_t *code_block, voodoo_t *voodoo, v
|
|||
addbyte(0xe8);
|
||||
addbyte(0xd3); /*SHR EBX, CL*/
|
||||
addbyte(0xeb);
|
||||
if (state->clamp_s)
|
||||
if (state->clamp_s[tmu])
|
||||
{
|
||||
addbyte(0x85); /*TEST EAX, EAX*/
|
||||
addbyte(0xc0);
|
||||
|
|
@ -634,7 +634,7 @@ static inline int codegen_texture_fetch(uint8_t *code_block, voodoo_t *voodoo, v
|
|||
addbyte(0x8e);
|
||||
addlong(offsetof(voodoo_params_t, tex_w_mask[tmu]) - 0x10);
|
||||
}
|
||||
if (state->clamp_t)
|
||||
if (state->clamp_t[tmu])
|
||||
{
|
||||
addbyte(0x85); /*TEST EBX, EBX*/
|
||||
addbyte(0xdb);
|
||||
|
|
|
|||
|
|
@ -227,8 +227,8 @@ static inline int codegen_texture_fetch(uint8_t *code_block, voodoo_t *voodoo, v
|
|||
addbyte(0x8b); /*MOV ECX, [ECX+EAX*4]*/
|
||||
addbyte(0x0c);
|
||||
addbyte(0x81);
|
||||
addbyte(0xbd); /*MOV EBP, 1*/
|
||||
addlong(1);
|
||||
addbyte(0xbd); /*MOV EBP, 8*/
|
||||
addlong(8);
|
||||
addbyte(0x28); /*SUB DL, CL*/
|
||||
addbyte(0xca);
|
||||
addbyte(0xd3); /*SHL EBP, CL*/
|
||||
|
|
@ -236,9 +236,6 @@ static inline int codegen_texture_fetch(uint8_t *code_block, voodoo_t *voodoo, v
|
|||
addbyte(0x8b); /*MOV EAX, state->tex_s[EDI]*/
|
||||
addbyte(0x87);
|
||||
addlong(offsetof(voodoo_state_t, tex_s));
|
||||
addbyte(0xc1); /*SHL EBP, 3*/
|
||||
addbyte(0xe5);
|
||||
addbyte(3);
|
||||
addbyte(0x8b); /*MOV EBX, state->tex_t[EDI]*/
|
||||
addbyte(0x9f);
|
||||
addlong(offsetof(voodoo_state_t, tex_t));
|
||||
|
|
@ -416,7 +413,7 @@ static inline int codegen_texture_fetch(uint8_t *code_block, voodoo_t *voodoo, v
|
|||
addbyte(0x0c);
|
||||
addbyte(0x82);
|
||||
|
||||
if (state->clamp_s)
|
||||
if (state->clamp_s[tmu])
|
||||
{
|
||||
addbyte(0xeb); /*JMP +*/
|
||||
addbyte(5+5+4+4);
|
||||
|
|
|
|||
Loading…
Reference in a new issue