softgpu: Move texenv color into sampler state.
This commit is contained in:
parent
ad3635c82a
commit
c0e85e6170
5 changed files with 10 additions and 8 deletions
|
@ -1649,19 +1649,19 @@ bool SamplerJitCache::Jit_ApplyTextureFunc(const SamplerID &id) {
|
|||
// We divide later.
|
||||
}
|
||||
|
||||
X64Reg gstateReg = GetGState();
|
||||
X64Reg idReg = GetSamplerID();
|
||||
X64Reg texEnvReg = regCache_.Alloc(RegCache::VEC_TEMP1);
|
||||
if (cpu_info.bSSE4_1) {
|
||||
PMOVZXBW(texEnvReg, MDisp(gstateReg, offsetof(GPUgstate, texenvcolor)));
|
||||
PMOVZXBW(texEnvReg, MDisp(idReg, offsetof(SamplerID, cached.texBlendColor)));
|
||||
} else {
|
||||
MOVD_xmm(texEnvReg, MDisp(gstateReg, offsetof(GPUgstate, texenvcolor)));
|
||||
MOVD_xmm(texEnvReg, MDisp(idReg, offsetof(SamplerID, cached.texBlendColor)));
|
||||
X64Reg zeroReg = GetZeroVec();
|
||||
PUNPCKLBW(texEnvReg, R(zeroReg));
|
||||
regCache_.Unlock(zeroReg, RegCache::VEC_ZERO);
|
||||
}
|
||||
PMULLW(resultReg, R(texEnvReg));
|
||||
regCache_.Release(texEnvReg, RegCache::VEC_TEMP1);
|
||||
regCache_.Unlock(gstateReg, RegCache::GEN_GSTATE);
|
||||
UnlockSamplerID(idReg);
|
||||
|
||||
// Add in the prim color side and divide.
|
||||
PADDW(resultReg, R(tempReg));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue