mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-02 09:03:37 +00:00
Don't send light data to shader if ucode does not support HWL.
This commit is contained in:
parent
7835cfb180
commit
c847ec9091
15
GBI.cpp
15
GBI.cpp
|
@ -115,6 +115,21 @@ void GBIInfo::destroy()
|
|||
m_list.clear();
|
||||
}
|
||||
|
||||
bool GBIInfo::isHWLSupported() const
|
||||
{
|
||||
if (m_pCurrent == NULL)
|
||||
return false;
|
||||
switch (m_pCurrent->type) {
|
||||
case S2DEX:
|
||||
case S2DEX2:
|
||||
case F3DDKR:
|
||||
case F3DJFG:
|
||||
case F3DEX2CBFD:
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void GBIInfo::_makeCurrent(MicrocodeInfo * _pCurrent)
|
||||
{
|
||||
if (_pCurrent->type == NONE) {
|
||||
|
|
1
GBI.h
1
GBI.h
|
@ -687,6 +687,7 @@ struct GBIInfo
|
|||
void destroy();
|
||||
void loadMicrocode(u32 uc_start, u32 uc_dstart, u16 uc_dsize);
|
||||
u32 getMicrocodeType() const {return m_pCurrent != NULL ? m_pCurrent->type : NONE;}
|
||||
bool isHWLSupported() const;
|
||||
|
||||
private:
|
||||
void _makeCurrent(MicrocodeInfo * _pCurrent);
|
||||
|
|
|
@ -597,7 +597,7 @@ void ShaderCombiner::updateRenderState(bool _bForce) {
|
|||
}
|
||||
|
||||
void ShaderCombiner::updateLight(bool _bForce) {
|
||||
if (config.enableHWLighting == 0)
|
||||
if (config.enableHWLighting == 0 || !GBI.isHWLSupported())
|
||||
return;
|
||||
for (s32 i = 0; i <= gSP.numLights; ++i) {
|
||||
_setV3Uniform(m_uniforms.uLightDirection[i], &gSP.lights[i].x, _bForce);
|
||||
|
|
Loading…
Reference in New Issue
Block a user