mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Merge branch 'master' into buffer_storage
Conflicts: Source/Core/VideoBackends/OGL/Src/Render.cpp Source/Core/VideoCommon/Src/DriverDetails.cpp Source/Core/VideoCommon/Src/DriverDetails.h
This commit is contained in:
commit
8d8b0fc884
2
Externals/GLES3/GLES3/gl3.h
vendored
2
Externals/GLES3/GLES3/gl3.h
vendored
@ -996,7 +996,7 @@ GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint draw
|
|||||||
GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint* value);
|
GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint* value);
|
||||||
GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat* value);
|
GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat* value);
|
||||||
GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
|
GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
|
||||||
GL_APICALL const GLubyte* GL_APIENTRY glGetStringi (GLenum name, GLuint index);
|
//GL_APICALL const GLubyte* GL_APIENTRY glGetStringi (GLenum name, GLuint index);
|
||||||
GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||||
GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices);
|
GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices);
|
||||||
GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params);
|
GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params);
|
||||||
|
@ -107,7 +107,6 @@ void Nunchuk::GetState(u8* const data, const bool focus)
|
|||||||
}
|
}
|
||||||
|
|
||||||
AccelData accel;
|
AccelData accel;
|
||||||
accel_cal* calib = (accel_cal*)®.calibration[0];
|
|
||||||
|
|
||||||
// tilt
|
// tilt
|
||||||
EmulateTilt(&accel, m_tilt, focus);
|
EmulateTilt(&accel, m_tilt, focus);
|
||||||
@ -117,7 +116,7 @@ void Nunchuk::GetState(u8* const data, const bool focus)
|
|||||||
// swing
|
// swing
|
||||||
EmulateSwing(&accel, m_swing);
|
EmulateSwing(&accel, m_swing);
|
||||||
// shake
|
// shake
|
||||||
EmulateShake(&accel, calib, m_shake, m_shake_step);
|
EmulateShake(&accel, m_shake, m_shake_step);
|
||||||
// buttons
|
// buttons
|
||||||
m_buttons->GetState(&ncdata->bt, nunchuk_button_bitmasks);
|
m_buttons->GetState(&ncdata->bt, nunchuk_button_bitmasks);
|
||||||
}
|
}
|
||||||
@ -154,10 +153,7 @@ void Nunchuk::GetState(u8* const data, const bool focus)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wm_accel* dt = (wm_accel*)&ncdata->ax;
|
FillRawAccelFromGForceData(*(wm_accel*)&ncdata->ax, *(accel_cal*)®.calibration, accel);
|
||||||
dt->x = u8(trim(accel.x * (calib->one_g.x - calib->zero_g.x) + calib->zero_g.x));
|
|
||||||
dt->y = u8(trim(accel.y * (calib->one_g.y - calib->zero_g.y) + calib->zero_g.y));
|
|
||||||
dt->z = u8(trim(accel.z * (calib->one_g.z - calib->zero_g.z) + calib->zero_g.z));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Nunchuk::LoadDefaults(const ControllerInterface& ciface)
|
void Nunchuk::LoadDefaults(const ControllerInterface& ciface)
|
||||||
|
@ -86,8 +86,16 @@ const ReportFeatures reporting_mode_features[] =
|
|||||||
{ 0, 0, 0, 0, 23 },
|
{ 0, 0, 0, 0, 23 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void FillRawAccelFromGForceData(wm_accel& raw_accel,
|
||||||
|
const accel_cal& calib,
|
||||||
|
const WiimoteEmu::AccelData& accel)
|
||||||
|
{
|
||||||
|
raw_accel.x = (u8)trim(accel.x * (calib.one_g.x - calib.zero_g.x) + calib.zero_g.x);
|
||||||
|
raw_accel.y = (u8)trim(accel.y * (calib.one_g.y - calib.zero_g.y) + calib.zero_g.y);
|
||||||
|
raw_accel.z = (u8)trim(accel.z * (calib.one_g.z - calib.zero_g.z) + calib.zero_g.z);
|
||||||
|
}
|
||||||
|
|
||||||
void EmulateShake(AccelData* const accel
|
void EmulateShake(AccelData* const accel
|
||||||
, accel_cal* const calib
|
|
||||||
, ControllerEmu::Buttons* const buttons_group
|
, ControllerEmu::Buttons* const buttons_group
|
||||||
, u8* const shake_step )
|
, u8* const shake_step )
|
||||||
{
|
{
|
||||||
@ -96,7 +104,7 @@ void EmulateShake(AccelData* const accel
|
|||||||
auto const shake_step_max = 15;
|
auto const shake_step_max = 15;
|
||||||
|
|
||||||
// peak G-force
|
// peak G-force
|
||||||
double shake_intensity;
|
auto const shake_intensity = 3.f;
|
||||||
|
|
||||||
// shake is a bitfield of X,Y,Z shake button states
|
// shake is a bitfield of X,Y,Z shake button states
|
||||||
static const unsigned int btns[] = { 0x01, 0x02, 0x04 };
|
static const unsigned int btns[] = { 0x01, 0x02, 0x04 };
|
||||||
@ -107,9 +115,6 @@ void EmulateShake(AccelData* const accel
|
|||||||
{
|
{
|
||||||
if (shake & (1 << i))
|
if (shake & (1 << i))
|
||||||
{
|
{
|
||||||
double zero = double((&(calib->zero_g.x))[i]);
|
|
||||||
double one = double((&(calib->one_g.x))[i]);
|
|
||||||
shake_intensity = max(zero / (one - zero), (255.f - zero) / (one - zero));
|
|
||||||
(&(accel->x))[i] = std::sin(TAU * shake_step[i] / shake_step_max) * shake_intensity;
|
(&(accel->x))[i] = std::sin(TAU * shake_step[i] / shake_step_max) * shake_intensity;
|
||||||
shake_step[i] = (shake_step[i] + 1) % shake_step_max;
|
shake_step[i] = (shake_step[i] + 1) % shake_step_max;
|
||||||
}
|
}
|
||||||
@ -406,12 +411,11 @@ void Wiimote::GetCoreData(u8* const data)
|
|||||||
*(wm_core*)data |= m_status.buttons;
|
*(wm_core*)data |= m_status.buttons;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Wiimote::GetAccelData(u8* const data, u8* const buttons)
|
void Wiimote::GetAccelData(u8* const data)
|
||||||
{
|
{
|
||||||
const bool has_focus = HAS_FOCUS;
|
const bool has_focus = HAS_FOCUS;
|
||||||
const bool is_sideways = m_options->settings[1]->value != 0;
|
const bool is_sideways = m_options->settings[1]->value != 0;
|
||||||
const bool is_upright = m_options->settings[2]->value != 0;
|
const bool is_upright = m_options->settings[2]->value != 0;
|
||||||
accel_cal* calib = (accel_cal*)&m_eeprom[0x16];
|
|
||||||
|
|
||||||
// ----TILT----
|
// ----TILT----
|
||||||
EmulateTilt(&m_accel, m_tilt, has_focus, is_sideways, is_upright);
|
EmulateTilt(&m_accel, m_tilt, has_focus, is_sideways, is_upright);
|
||||||
@ -421,22 +425,11 @@ void Wiimote::GetAccelData(u8* const data, u8* const buttons)
|
|||||||
if (has_focus)
|
if (has_focus)
|
||||||
{
|
{
|
||||||
EmulateSwing(&m_accel, m_swing, is_sideways, is_upright);
|
EmulateSwing(&m_accel, m_swing, is_sideways, is_upright);
|
||||||
EmulateShake(&m_accel, calib, m_shake, m_shake_step);
|
EmulateShake(&m_accel, m_shake, m_shake_step);
|
||||||
UDPTLayer::GetAcceleration(m_udp, &m_accel);
|
UDPTLayer::GetAcceleration(m_udp, &m_accel);
|
||||||
}
|
}
|
||||||
wm_accel* dt = (wm_accel*)data;
|
|
||||||
double cx,cy,cz;
|
FillRawAccelFromGForceData(*(wm_accel*)data, *(accel_cal*)&m_eeprom[0x16], m_accel);
|
||||||
cx=trim(m_accel.x*(calib->one_g.x-calib->zero_g.x)+calib->zero_g.x);
|
|
||||||
cy=trim(m_accel.y*(calib->one_g.y-calib->zero_g.y)+calib->zero_g.y);
|
|
||||||
cz=trim(m_accel.z*(calib->one_g.z-calib->zero_g.z)+calib->zero_g.z);
|
|
||||||
dt->x=u8(cx);
|
|
||||||
dt->y=u8(cy);
|
|
||||||
dt->z=u8(cz);
|
|
||||||
if (buttons)
|
|
||||||
{
|
|
||||||
buttons[0]|=(u8(cx*4)&3)<<5;
|
|
||||||
buttons[1]|=((u8(cy*2)&1)<<5)|((u8(cz*2)&1)<<6);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#define kCutoffFreq 5.0f
|
#define kCutoffFreq 5.0f
|
||||||
inline void LowPassFilter(double & var, double newval, double period)
|
inline void LowPassFilter(double & var, double newval, double period)
|
||||||
@ -683,7 +676,7 @@ void Wiimote::Update()
|
|||||||
|
|
||||||
// acceleration
|
// acceleration
|
||||||
if (rptf.accel)
|
if (rptf.accel)
|
||||||
GetAccelData(data + rptf.accel, rptf.core?(data+rptf.core):NULL);
|
GetAccelData(data + rptf.accel);
|
||||||
|
|
||||||
// IR
|
// IR
|
||||||
if (rptf.ir)
|
if (rptf.ir)
|
||||||
|
@ -73,8 +73,11 @@ struct ExtensionReg
|
|||||||
|
|
||||||
extern const ReportFeatures reporting_mode_features[];
|
extern const ReportFeatures reporting_mode_features[];
|
||||||
|
|
||||||
|
void FillRawAccelFromGForceData(wm_accel& raw_accel,
|
||||||
|
const accel_cal& calib,
|
||||||
|
const WiimoteEmu::AccelData& accel);
|
||||||
|
|
||||||
void EmulateShake(AccelData* const accel_data
|
void EmulateShake(AccelData* const accel_data
|
||||||
, accel_cal* const calib
|
|
||||||
, ControllerEmu::Buttons* const buttons_group
|
, ControllerEmu::Buttons* const buttons_group
|
||||||
, u8* const shake_step);
|
, u8* const shake_step);
|
||||||
|
|
||||||
@ -134,7 +137,7 @@ protected:
|
|||||||
void UpdateButtonsStatus(bool has_focus);
|
void UpdateButtonsStatus(bool has_focus);
|
||||||
|
|
||||||
void GetCoreData(u8* const data);
|
void GetCoreData(u8* const data);
|
||||||
void GetAccelData(u8* const data, u8* const buttons);
|
void GetAccelData(u8* const data);
|
||||||
void GetIRData(u8* const data, bool use_accel);
|
void GetIRData(u8* const data, bool use_accel);
|
||||||
void GetExtData(u8* const data);
|
void GetExtData(u8* const data);
|
||||||
|
|
||||||
|
@ -187,6 +187,7 @@ public:
|
|||||||
void mtsr(UGeckoInstruction _inst);
|
void mtsr(UGeckoInstruction _inst);
|
||||||
void mfsr(UGeckoInstruction _inst);
|
void mfsr(UGeckoInstruction _inst);
|
||||||
void mcrxr(UGeckoInstruction _inst);
|
void mcrxr(UGeckoInstruction _inst);
|
||||||
|
void twx(UGeckoInstruction _inst);
|
||||||
|
|
||||||
// LoadStore
|
// LoadStore
|
||||||
void stX(UGeckoInstruction _inst);
|
void stX(UGeckoInstruction _inst);
|
||||||
|
@ -90,7 +90,6 @@ void JitArm::ComputeCarry(bool Carry)
|
|||||||
BIC(tmp, tmp, mask);
|
BIC(tmp, tmp, mask);
|
||||||
STR(tmp, R9, PPCSTATE_OFF(spr[SPR_XER]));
|
STR(tmp, R9, PPCSTATE_OFF(spr[SPR_XER]));
|
||||||
gpr.Unlock(tmp);
|
gpr.Unlock(tmp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JitArm::GetCarryAndClear(ARMReg reg)
|
void JitArm::GetCarryAndClear(ARMReg reg)
|
||||||
@ -802,7 +801,6 @@ void JitArm::cmpli(UGeckoInstruction inst)
|
|||||||
|
|
||||||
STRB(rA, R9, PPCSTATE_OFF(cr_fast) + crf);
|
STRB(rA, R9, PPCSTATE_OFF(cr_fast) + crf);
|
||||||
gpr.Unlock(rA);
|
gpr.Unlock(rA);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JitArm::negx(UGeckoInstruction inst)
|
void JitArm::negx(UGeckoInstruction inst)
|
||||||
@ -950,3 +948,74 @@ void JitArm::srawix(UGeckoInstruction inst)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JitArm::twx(UGeckoInstruction inst)
|
||||||
|
{
|
||||||
|
INSTRUCTION_START
|
||||||
|
JITDISABLE(bJITIntegerOff)
|
||||||
|
|
||||||
|
s32 a = inst.RA;
|
||||||
|
|
||||||
|
gpr.Flush();
|
||||||
|
fpr.Flush();
|
||||||
|
|
||||||
|
ARMReg RA = gpr.GetReg();
|
||||||
|
ARMReg RB = gpr.GetReg();
|
||||||
|
MOV(RA, inst.TO);
|
||||||
|
|
||||||
|
if (inst.OPCD == 3) // twi
|
||||||
|
CMP(gpr.R(a), gpr.R(inst.RB));
|
||||||
|
else // tw
|
||||||
|
{
|
||||||
|
MOVI2R(RB, (s32)(s16)inst.SIMM_16);
|
||||||
|
CMP(gpr.R(a), RB);
|
||||||
|
}
|
||||||
|
|
||||||
|
FixupBranch al = B_CC(CC_LT);
|
||||||
|
FixupBranch ag = B_CC(CC_GT);
|
||||||
|
FixupBranch ae = B_CC(CC_EQ);
|
||||||
|
// FIXME: will never be reached. But also no known code uses it...
|
||||||
|
FixupBranch ll = B_CC(CC_VC);
|
||||||
|
FixupBranch lg = B_CC(CC_VS);
|
||||||
|
|
||||||
|
SetJumpTarget(al);
|
||||||
|
TST(RA, 16);
|
||||||
|
FixupBranch exit1 = B_CC(CC_NEQ);
|
||||||
|
FixupBranch take1 = B();
|
||||||
|
SetJumpTarget(ag);
|
||||||
|
TST(RA, 8);
|
||||||
|
FixupBranch exit2 = B_CC(CC_NEQ);
|
||||||
|
FixupBranch take2 = B();
|
||||||
|
SetJumpTarget(ae);
|
||||||
|
TST(RA, 4);
|
||||||
|
FixupBranch exit3 = B_CC(CC_NEQ);
|
||||||
|
FixupBranch take3 = B();
|
||||||
|
SetJumpTarget(ll);
|
||||||
|
TST(RA, 2);
|
||||||
|
FixupBranch exit4 = B_CC(CC_NEQ);
|
||||||
|
FixupBranch take4 = B();
|
||||||
|
SetJumpTarget(lg);
|
||||||
|
TST(RA, 1);
|
||||||
|
FixupBranch exit5 = B_CC(CC_NEQ);
|
||||||
|
FixupBranch take5 = B();
|
||||||
|
|
||||||
|
SetJumpTarget(take1);
|
||||||
|
SetJumpTarget(take2);
|
||||||
|
SetJumpTarget(take3);
|
||||||
|
SetJumpTarget(take4);
|
||||||
|
SetJumpTarget(take5);
|
||||||
|
|
||||||
|
LDR(RA, R9, PPCSTATE_OFF(Exceptions));
|
||||||
|
MOVI2R(RB, EXCEPTION_PROGRAM); // XXX: Can be optimized
|
||||||
|
ORR(RA, RA, RB);
|
||||||
|
STR(RA, R9, PPCSTATE_OFF(Exceptions));
|
||||||
|
WriteExceptionExit();
|
||||||
|
|
||||||
|
SetJumpTarget(exit1);
|
||||||
|
SetJumpTarget(exit2);
|
||||||
|
SetJumpTarget(exit3);
|
||||||
|
SetJumpTarget(exit4);
|
||||||
|
SetJumpTarget(exit5);
|
||||||
|
WriteExit(js.compilerPC + 4, 1);
|
||||||
|
|
||||||
|
gpr.Unlock(RA, RB);
|
||||||
|
}
|
||||||
|
@ -55,7 +55,7 @@ static GekkoOPTemplate primarytable[] =
|
|||||||
|
|
||||||
{1, &JitArm::HLEFunction}, //"HLEFunction", OPTYPE_SYSTEM, FL_ENDBLOCK}},
|
{1, &JitArm::HLEFunction}, //"HLEFunction", OPTYPE_SYSTEM, FL_ENDBLOCK}},
|
||||||
{2, &JitArm::Default}, //"DynaBlock", OPTYPE_SYSTEM, 0}},
|
{2, &JitArm::Default}, //"DynaBlock", OPTYPE_SYSTEM, 0}},
|
||||||
{3, &JitArm::Break}, //"twi", OPTYPE_SYSTEM, FL_ENDBLOCK}},
|
{3, &JitArm::twx}, //"twi", OPTYPE_SYSTEM, FL_ENDBLOCK}},
|
||||||
{17, &JitArm::sc}, //"sc", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}},
|
{17, &JitArm::sc}, //"sc", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}},
|
||||||
|
|
||||||
{7, &JitArm::arith}, //"mulli", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_RC_BIT, 2}},
|
{7, &JitArm::arith}, //"mulli", OPTYPE_INTEGER, FL_OUT_D | FL_IN_A | FL_RC_BIT, 2}},
|
||||||
@ -292,7 +292,7 @@ static GekkoOPTemplate table31[] =
|
|||||||
{595, &JitArm::mfsr}, //"mfsr", OPTYPE_SYSTEM, FL_OUT_D, 2}},
|
{595, &JitArm::mfsr}, //"mfsr", OPTYPE_SYSTEM, FL_OUT_D, 2}},
|
||||||
{659, &JitArm::Default}, //"mfsrin", OPTYPE_SYSTEM, FL_OUT_D, 2}},
|
{659, &JitArm::Default}, //"mfsrin", OPTYPE_SYSTEM, FL_OUT_D, 2}},
|
||||||
|
|
||||||
{4, &JitArm::Break}, //"tw", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}},
|
{4, &JitArm::twx}, //"tw", OPTYPE_SYSTEM, FL_ENDBLOCK, 1}},
|
||||||
{598, &JitArm::DoNothing}, //"sync", OPTYPE_SYSTEM, 0, 2}},
|
{598, &JitArm::DoNothing}, //"sync", OPTYPE_SYSTEM, 0, 2}},
|
||||||
{982, &JitArm::icbi}, //"icbi", OPTYPE_SYSTEM, FL_ENDBLOCK, 3}},
|
{982, &JitArm::icbi}, //"icbi", OPTYPE_SYSTEM, FL_ENDBLOCK, 3}},
|
||||||
|
|
||||||
|
@ -1221,14 +1221,7 @@ void CConfigMain::WiiSettingsChanged(wxCommandEvent& event)
|
|||||||
// -------------------
|
// -------------------
|
||||||
void CConfigMain::ISOPathsSelectionChanged(wxCommandEvent& WXUNUSED (event))
|
void CConfigMain::ISOPathsSelectionChanged(wxCommandEvent& WXUNUSED (event))
|
||||||
{
|
{
|
||||||
if (!ISOPaths->GetStringSelection().empty())
|
RemoveISOPath->Enable(ISOPaths->GetSelection() != wxNOT_FOUND);
|
||||||
{
|
|
||||||
RemoveISOPath->Enable(true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
RemoveISOPath->Enable(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConfigMain::AddRemoveISOPaths(wxCommandEvent& event)
|
void CConfigMain::AddRemoveISOPaths(wxCommandEvent& event)
|
||||||
@ -1255,6 +1248,11 @@ void CConfigMain::AddRemoveISOPaths(wxCommandEvent& event)
|
|||||||
{
|
{
|
||||||
bRefreshList = true;
|
bRefreshList = true;
|
||||||
ISOPaths->Delete(ISOPaths->GetSelection());
|
ISOPaths->Delete(ISOPaths->GetSelection());
|
||||||
|
|
||||||
|
// This seems to not be activated on Windows when it should be. wxw bug?
|
||||||
|
#ifdef _WIN32
|
||||||
|
ISOPathsSelectionChanged(wxCommandEvent());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save changes right away
|
// Save changes right away
|
||||||
|
@ -16,6 +16,7 @@ public:
|
|||||||
virtual void Swap() {}
|
virtual void Swap() {}
|
||||||
virtual void UpdateFPSDisplay(const char *Text) {}
|
virtual void UpdateFPSDisplay(const char *Text) {}
|
||||||
virtual void SetMode(u32 mode) { s_opengl_mode = mode; }
|
virtual void SetMode(u32 mode) { s_opengl_mode = mode; }
|
||||||
|
virtual u32 GetMode() { return s_opengl_mode; }
|
||||||
virtual bool Create(void *&window_handle) { return true; }
|
virtual bool Create(void *&window_handle) { return true; }
|
||||||
virtual bool MakeCurrent() { return true; }
|
virtual bool MakeCurrent() { return true; }
|
||||||
virtual bool ClearCurrent() { return true; }
|
virtual bool ClearCurrent() { return true; }
|
||||||
|
@ -1167,6 +1167,7 @@ void Renderer::SetGenerationMode()
|
|||||||
};
|
};
|
||||||
|
|
||||||
// rastdc.FrontCounterClockwise must be false for this to work
|
// rastdc.FrontCounterClockwise must be false for this to work
|
||||||
|
// TODO: GX_CULL_ALL not supported, yet!
|
||||||
gx_state.rastdc.CullMode = d3dCullModes[bpmem.genMode.cullmode];
|
gx_state.rastdc.CullMode = d3dCullModes[bpmem.genMode.cullmode];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
#include "DriverDetails.h"
|
#include "DriverDetails.h"
|
||||||
#include "GLFunctions.h"
|
#include "GLFunctions.h"
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
|
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
#ifdef USE_GLES3
|
#ifdef USE_GLES3
|
||||||
PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
|
PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
|
||||||
@ -13,6 +15,7 @@ PFNGLUNMAPBUFFERPROC glUnmapBuffer;
|
|||||||
PFNGLBINDBUFFERRANGEPROC glBindBufferRange;
|
PFNGLBINDBUFFERRANGEPROC glBindBufferRange;
|
||||||
|
|
||||||
PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer;
|
PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer;
|
||||||
|
PFNGLGETSTRINGIPROC glGetStringi;
|
||||||
|
|
||||||
PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
|
PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
|
||||||
PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
|
PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
|
||||||
@ -49,6 +52,8 @@ PFNGLGENQUERIESPROC glGenQueries;
|
|||||||
namespace GLFunc
|
namespace GLFunc
|
||||||
{
|
{
|
||||||
void *self;
|
void *self;
|
||||||
|
std::unordered_map<std::string, bool> _extensions;
|
||||||
|
|
||||||
void LoadFunction(const char *name, void **func)
|
void LoadFunction(const char *name, void **func)
|
||||||
{
|
{
|
||||||
#ifdef USE_GLES3
|
#ifdef USE_GLES3
|
||||||
@ -67,10 +72,27 @@ namespace GLFunc
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SupportsExt(std::string ext)
|
||||||
|
{
|
||||||
|
return _extensions.find(ext) != _extensions.end();
|
||||||
|
}
|
||||||
|
|
||||||
|
void InitExtensions()
|
||||||
|
{
|
||||||
|
GLint NumExtension = 0;
|
||||||
|
glGetIntegerv(GL_NUM_EXTENSIONS, &NumExtension);
|
||||||
|
for (GLint i = 0; i < NumExtension; ++i)
|
||||||
|
_extensions[std::string((const char*)glGetStringi(GL_EXTENSIONS, i))] = true;
|
||||||
|
}
|
||||||
|
|
||||||
void Init()
|
void Init()
|
||||||
{
|
{
|
||||||
self = dlopen(NULL, RTLD_LAZY);
|
self = dlopen(NULL, RTLD_LAZY);
|
||||||
|
|
||||||
|
LoadFunction("glGetStringi", (void**)&glGetStringi);
|
||||||
|
|
||||||
|
InitExtensions();
|
||||||
|
|
||||||
LoadFunction("glUnmapBuffer", (void**)&glUnmapBuffer);
|
LoadFunction("glUnmapBuffer", (void**)&glUnmapBuffer);
|
||||||
LoadFunction("glBeginQuery", (void**)&glBeginQuery);
|
LoadFunction("glBeginQuery", (void**)&glBeginQuery);
|
||||||
LoadFunction("glEndQuery", (void**)&glEndQuery);
|
LoadFunction("glEndQuery", (void**)&glEndQuery);
|
||||||
|
@ -10,8 +10,10 @@ typedef GLvoid* (*PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
|
|||||||
typedef GLvoid* (*PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
typedef GLvoid* (*PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||||
typedef void (*PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
typedef void (*PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||||
typedef GLboolean (*PFNGLUNMAPBUFFERPROC) (GLenum target);
|
typedef GLboolean (*PFNGLUNMAPBUFFERPROC) (GLenum target);
|
||||||
|
typedef GLubyte* (*PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
|
||||||
|
|
||||||
typedef void (*PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
typedef void (*PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||||
|
|
||||||
// VAOS
|
// VAOS
|
||||||
typedef void (*PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint* arrays);
|
typedef void (*PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint* arrays);
|
||||||
typedef void (*PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint* arrays);
|
typedef void (*PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint* arrays);
|
||||||
@ -63,6 +65,7 @@ extern PFNGLMAPBUFFERRANGEPROC glMapBufferRange;
|
|||||||
extern PFNGLBINDBUFFERRANGEPROC glBindBufferRange;
|
extern PFNGLBINDBUFFERRANGEPROC glBindBufferRange;
|
||||||
|
|
||||||
extern PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer;
|
extern PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer;
|
||||||
|
extern PFNGLGETSTRINGIPROC glGetStringi;
|
||||||
|
|
||||||
extern PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
|
extern PFNGLGENVERTEXARRAYSPROC glGenVertexArrays;
|
||||||
extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
|
extern PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays;
|
||||||
@ -95,5 +98,6 @@ extern PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding;
|
|||||||
namespace GLFunc
|
namespace GLFunc
|
||||||
{
|
{
|
||||||
void Init();
|
void Init();
|
||||||
|
bool SupportsExt(std::string ext);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -260,6 +260,7 @@ void InitDriverInfo()
|
|||||||
DriverDetails::Vendor vendor = DriverDetails::VENDOR_UNKNOWN;
|
DriverDetails::Vendor vendor = DriverDetails::VENDOR_UNKNOWN;
|
||||||
DriverDetails::Driver driver = DriverDetails::DRIVER_UNKNOWN;
|
DriverDetails::Driver driver = DriverDetails::DRIVER_UNKNOWN;
|
||||||
double version = 0.0;
|
double version = 0.0;
|
||||||
|
u32 family = 0;
|
||||||
|
|
||||||
// Get the vendor first
|
// Get the vendor first
|
||||||
if (svendor == "NVIDIA Corporation" && srenderer != "NVIDIA Tegra")
|
if (svendor == "NVIDIA Corporation" && srenderer != "NVIDIA Tegra")
|
||||||
@ -321,11 +322,23 @@ void InitDriverInfo()
|
|||||||
version = 100*major + 10*minor + release;
|
version = 100*major + 10*minor + release;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case DriverDetails::VENDOR_INTEL: // Happens in OS X
|
||||||
|
sscanf(g_ogl_config.gl_renderer, "Intel HD Graphics %d", &family);
|
||||||
|
/*
|
||||||
|
int glmajor = 0;
|
||||||
|
int glminor = 0;
|
||||||
|
int major = 0;
|
||||||
|
int minor = 0;
|
||||||
|
int release = 0;
|
||||||
|
sscanf(g_ogl_config.gl_version, "%d.%d INTEL-%d.%d.%d", &glmajor, &glminor, &major, &minor, &release);
|
||||||
|
version = 10000*major + 1000*minor + release;
|
||||||
|
*/
|
||||||
|
break;
|
||||||
// We don't care about these
|
// We don't care about these
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DriverDetails::Init(vendor, driver, version);
|
DriverDetails::Init(vendor, driver, version, family);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init functions
|
// Init functions
|
||||||
@ -359,11 +372,7 @@ Renderer::Renderer()
|
|||||||
g_Config.backend_info.bSupportsPrimitiveRestart = true;
|
g_Config.backend_info.bSupportsPrimitiveRestart = true;
|
||||||
g_Config.backend_info.bSupportsEarlyZ = false;
|
g_Config.backend_info.bSupportsEarlyZ = false;
|
||||||
|
|
||||||
#ifdef ANDROID
|
|
||||||
g_ogl_config.bSupportsGLSLCache = false;
|
|
||||||
#else
|
|
||||||
g_ogl_config.bSupportsGLSLCache = true;
|
g_ogl_config.bSupportsGLSLCache = true;
|
||||||
#endif
|
|
||||||
g_ogl_config.bSupportsGLPinnedMemory = false;
|
g_ogl_config.bSupportsGLPinnedMemory = false;
|
||||||
g_ogl_config.bSupportsGLSync = true;
|
g_ogl_config.bSupportsGLSync = true;
|
||||||
g_ogl_config.bSupportsGLBaseVertex = false;
|
g_ogl_config.bSupportsGLBaseVertex = false;
|
||||||
@ -470,7 +479,8 @@ Renderer::Renderer()
|
|||||||
|
|
||||||
g_Config.backend_info.bSupportsDualSourceBlend = TO_BOOL(GLEW_ARB_blend_func_extended);
|
g_Config.backend_info.bSupportsDualSourceBlend = TO_BOOL(GLEW_ARB_blend_func_extended);
|
||||||
g_Config.backend_info.bSupportsGLSLUBO = TO_BOOL(GLEW_ARB_uniform_buffer_object);
|
g_Config.backend_info.bSupportsGLSLUBO = TO_BOOL(GLEW_ARB_uniform_buffer_object);
|
||||||
g_Config.backend_info.bSupportsPrimitiveRestart = TO_BOOL(GLEW_VERSION_3_1) || TO_BOOL(GLEW_NV_primitive_restart);
|
g_Config.backend_info.bSupportsPrimitiveRestart = !DriverDetails::HasBug(DriverDetails::BUG_PRIMITIVERESTART) &&
|
||||||
|
(TO_BOOL(GLEW_VERSION_3_1) || TO_BOOL(GLEW_NV_primitive_restart));
|
||||||
g_Config.backend_info.bSupportsEarlyZ = TO_BOOL(GLEW_ARB_shader_image_load_store);
|
g_Config.backend_info.bSupportsEarlyZ = TO_BOOL(GLEW_ARB_shader_image_load_store);
|
||||||
|
|
||||||
g_ogl_config.bSupportsGLSLCache = TO_BOOL(GLEW_ARB_get_program_binary);
|
g_ogl_config.bSupportsGLSLCache = TO_BOOL(GLEW_ARB_get_program_binary);
|
||||||
@ -1680,6 +1690,7 @@ void Renderer::SetGenerationMode()
|
|||||||
// none, ccw, cw, ccw
|
// none, ccw, cw, ccw
|
||||||
if (bpmem.genMode.cullmode > 0)
|
if (bpmem.genMode.cullmode > 0)
|
||||||
{
|
{
|
||||||
|
// TODO: GX_CULL_ALL not supported, yet!
|
||||||
glEnable(GL_CULL_FACE);
|
glEnable(GL_CULL_FACE);
|
||||||
glFrontFace(bpmem.genMode.cullmode == 2 ? GL_CCW : GL_CW);
|
glFrontFace(bpmem.genMode.cullmode == 2 ? GL_CCW : GL_CW);
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,9 @@ StreamBuffer::StreamBuffer(u32 type, size_t size, StreamType uploadType)
|
|||||||
m_uploadtype = BUFFERDATA;
|
m_uploadtype = BUFFERDATA;
|
||||||
else if(g_ogl_config.bSupportsGLSync && g_ActiveConfig.bHackedBufferUpload && (m_uploadtype & MAP_AND_RISK))
|
else if(g_ogl_config.bSupportsGLSync && g_ActiveConfig.bHackedBufferUpload && (m_uploadtype & MAP_AND_RISK))
|
||||||
m_uploadtype = MAP_AND_RISK;
|
m_uploadtype = MAP_AND_RISK;
|
||||||
else if(g_ogl_config.bSupportsGLSync && g_ogl_config.bSupportsGLPinnedMemory && (m_uploadtype & PINNED_MEMORY))
|
else if(g_ogl_config.bSupportsGLSync && g_ogl_config.bSupportsGLPinnedMemory &&
|
||||||
|
!(DriverDetails::HasBug(DriverDetails::BUG_BROKENPINNEDMEMORY) && type == GL_ELEMENT_ARRAY_BUFFER) &&
|
||||||
|
(m_uploadtype & PINNED_MEMORY))
|
||||||
m_uploadtype = PINNED_MEMORY;
|
m_uploadtype = PINNED_MEMORY;
|
||||||
else if(nvidia && (m_uploadtype & BUFFERSUBDATA))
|
else if(nvidia && (m_uploadtype & BUFFERSUBDATA))
|
||||||
m_uploadtype = BUFFERSUBDATA;
|
m_uploadtype = BUFFERSUBDATA;
|
||||||
|
@ -385,6 +385,10 @@ void DrawTriangleFrontFace(OutputVertexData *v0, OutputVertexData *v1, OutputVer
|
|||||||
float w[3] = { 1.0f / v0->projectedPosition.w, 1.0f / v1->projectedPosition.w, 1.0f / v2->projectedPosition.w };
|
float w[3] = { 1.0f / v0->projectedPosition.w, 1.0f / v1->projectedPosition.w, 1.0f / v2->projectedPosition.w };
|
||||||
InitSlope(&WSlope, w[0], w[1], w[2], fltdx31, fltdx12, fltdy12, fltdy31);
|
InitSlope(&WSlope, w[0], w[1], w[2], fltdx31, fltdx12, fltdy12, fltdy31);
|
||||||
|
|
||||||
|
// TODO: The zfreeze emulation is not quite correct, yet!
|
||||||
|
// Many things might prevent us from reaching this line (culling, clipping, scissoring).
|
||||||
|
// However, the zslope is always guaranteed to be calculated unless all vertices are trivially rejected during clipping!
|
||||||
|
// We're currently sloppy at this since we abort early if any of the culling/clipping/scissoring tests fail.
|
||||||
if (!bpmem.genMode.zfreeze || !g_SWVideoConfig.bZFreeze)
|
if (!bpmem.genMode.zfreeze || !g_SWVideoConfig.bZFreeze)
|
||||||
InitSlope(&ZSlope, v0->screenPosition[2], v1->screenPosition[2], v2->screenPosition[2], fltdx31, fltdx12, fltdy12, fltdy31);
|
InitSlope(&ZSlope, v0->screenPosition[2], v1->screenPosition[2], v2->screenPosition[2], fltdx31, fltdx12, fltdy12, fltdy31);
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ namespace DriverDetails
|
|||||||
u32 m_os; // Which OS has the issue
|
u32 m_os; // Which OS has the issue
|
||||||
Vendor m_vendor; // Which vendor has the error
|
Vendor m_vendor; // Which vendor has the error
|
||||||
Driver m_driver; // Which driver has the error
|
Driver m_driver; // Which driver has the error
|
||||||
|
s32 m_family; // Which family of hardware has the issue
|
||||||
Bug m_bug; // Which bug it is
|
Bug m_bug; // Which bug it is
|
||||||
double m_versionstart; // When it started
|
double m_versionstart; // When it started
|
||||||
double m_versionend; // When it ended
|
double m_versionend; // When it ended
|
||||||
@ -33,35 +34,38 @@ namespace DriverDetails
|
|||||||
|
|
||||||
Vendor m_vendor = VENDOR_UNKNOWN;
|
Vendor m_vendor = VENDOR_UNKNOWN;
|
||||||
Driver m_driver = DRIVER_UNKNOWN;
|
Driver m_driver = DRIVER_UNKNOWN;
|
||||||
|
s32 m_family = 0.0;
|
||||||
double m_version = 0.0;
|
double m_version = 0.0;
|
||||||
|
|
||||||
// This is a list of all known bugs for each vendor
|
// This is a list of all known bugs for each vendor
|
||||||
// We use this to check if the device and driver has a issue
|
// We use this to check if the device and driver has a issue
|
||||||
BugInfo m_known_bugs[] = {
|
BugInfo m_known_bugs[] = {
|
||||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_NODYNUBOACCESS, 14.0, 46.0, true},
|
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_NODYNUBOACCESS, 14.0, 46.0, true},
|
||||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_BROKENCENTROID, 14.0, 46.0, true},
|
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENCENTROID, 14.0, 46.0, true},
|
||||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_BROKENINFOLOG, -1.0, 46.0, true},
|
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENINFOLOG, -1.0, 46.0, true},
|
||||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_ANNIHILATEDUBOS, 41.0, 46.0, true},
|
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_ANNIHILATEDUBOS, 41.0, 46.0, true},
|
||||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_BROKENSWAP, -1.0, 46.0, true},
|
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENSWAP, -1.0, 46.0, true},
|
||||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
|
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
|
||||||
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, BUG_BROKENTEXTURESIZE, -1.0, -1.0, true},
|
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENTEXTURESIZE, -1.0, -1.0, true},
|
||||||
{OS_ALL, VENDOR_ARM, DRIVER_ARM_T6XX, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
|
{OS_ALL, VENDOR_ARM, DRIVER_ARM_T6XX, -1, BUG_BROKENBUFFERSTREAM, -1.0, -1.0, true},
|
||||||
{OS_ALL, VENDOR_MESA, DRIVER_NOUVEAU, BUG_BROKENUBO, 900, 916, true},
|
{OS_ALL, VENDOR_MESA, DRIVER_NOUVEAU, -1, BUG_BROKENUBO, 900, 916, true},
|
||||||
{OS_ALL, VENDOR_MESA, DRIVER_R600, BUG_BROKENUBO, 900, 913, true},
|
{OS_ALL, VENDOR_MESA, DRIVER_R600, -1, BUG_BROKENUBO, 900, 913, true},
|
||||||
{OS_ALL, VENDOR_MESA, DRIVER_I965, BUG_BROKENUBO, 900, 920, true},
|
{OS_ALL, VENDOR_MESA, DRIVER_I965, -1, BUG_BROKENUBO, 900, 920, true},
|
||||||
{OS_ALL, VENDOR_ATI, DRIVER_ATI, BUG_BROKENHACKEDBUFFER, -1.0, -1.0, true},
|
{OS_ALL, VENDOR_ATI, DRIVER_ATI, -1, BUG_BROKENHACKEDBUFFER, -1.0, -1.0, true},
|
||||||
{OS_LINUX, VENDOR_ATI, DRIVER_ATI, BUG_BROKENPINNEDMEMORY, -1.0, -1.0, true},
|
{OS_LINUX, VENDOR_ATI, DRIVER_ATI, -1, BUG_BROKENPINNEDMEMORY, -1.0, -1.0, true},
|
||||||
{OS_ALL, VENDOR_MESA, DRIVER_NOUVEAU, BUG_BROKENHACKEDBUFFER, -1.0, -1.0, true},
|
{OS_ALL, VENDOR_MESA, DRIVER_NOUVEAU, -1, BUG_BROKENHACKEDBUFFER, -1.0, -1.0, true},
|
||||||
{OS_ALL, VENDOR_NVIDIA, DRIVER_NVIDIA, BUG_BROKENBUFFERSTORAGE, -1.0, -1.0, true},
|
{OS_ALL, VENDOR_NVIDIA, DRIVER_NVIDIA, -1, BUG_BROKENBUFFERSTORAGE, -1.0, -1.0, true},
|
||||||
|
{OS_OSX, VENDOR_INTEL, DRIVER_INTEL, 3000, BUG_PRIMITIVERESTART, -1.0, -1.0, true},
|
||||||
};
|
};
|
||||||
|
|
||||||
std::map<Bug, BugInfo> m_bugs;
|
std::map<Bug, BugInfo> m_bugs;
|
||||||
|
|
||||||
void Init(Vendor vendor, Driver driver, const double version)
|
void Init(Vendor vendor, Driver driver, const double version, const s32 family)
|
||||||
{
|
{
|
||||||
m_vendor = vendor;
|
m_vendor = vendor;
|
||||||
m_driver = driver;
|
m_driver = driver;
|
||||||
m_version = version;
|
m_version = version;
|
||||||
|
m_family = family;
|
||||||
|
|
||||||
if (driver == DRIVER_UNKNOWN)
|
if (driver == DRIVER_UNKNOWN)
|
||||||
switch(vendor)
|
switch(vendor)
|
||||||
@ -92,6 +96,7 @@ namespace DriverDetails
|
|||||||
( bug.m_os & m_os ) &&
|
( bug.m_os & m_os ) &&
|
||||||
( bug.m_vendor == m_vendor || bug.m_vendor == VENDOR_ALL ) &&
|
( bug.m_vendor == m_vendor || bug.m_vendor == VENDOR_ALL ) &&
|
||||||
( bug.m_driver == m_driver || bug.m_driver == DRIVER_ALL ) &&
|
( bug.m_driver == m_driver || bug.m_driver == DRIVER_ALL ) &&
|
||||||
|
( bug.m_family == m_family || bug.m_family == -1) &&
|
||||||
( bug.m_versionstart <= m_version || bug.m_versionstart == -1 ) &&
|
( bug.m_versionstart <= m_version || bug.m_versionstart == -1 ) &&
|
||||||
( bug.m_versionend > m_version || bug.m_versionend == -1 )
|
( bug.m_versionend > m_version || bug.m_versionend == -1 )
|
||||||
)
|
)
|
||||||
|
@ -149,10 +149,18 @@ namespace DriverDetails
|
|||||||
// It reduces what is needed for streaming to basically a memcpy call
|
// It reduces what is needed for streaming to basically a memcpy call
|
||||||
// It seems to work for all buffer types except GL_ARRAY_BUFFER
|
// It seems to work for all buffer types except GL_ARRAY_BUFFER
|
||||||
BUG_BROKENBUFFERSTORAGE,
|
BUG_BROKENBUFFERSTORAGE,
|
||||||
|
// Bug: Intel HD 3000 on OS X has broken primitive restart
|
||||||
|
// Affected devices: Intel HD 3000
|
||||||
|
// Affected OS: OS X
|
||||||
|
// Started Version: -1
|
||||||
|
// Ended Version: -1
|
||||||
|
// The drivers on OS X has broken primitive restart.
|
||||||
|
// Intel HD 4000 series isn't affected by the bug
|
||||||
|
BUG_PRIMITIVERESTART,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initializes our internal vendor, device family, and driver version
|
// Initializes our internal vendor, device family, and driver version
|
||||||
void Init(Vendor vendor, Driver driver, const double version);
|
void Init(Vendor vendor, Driver driver, const double version, const s32 family);
|
||||||
|
|
||||||
// Once Vendor and driver version is set, this will return if it has the applicable bug passed to it.
|
// Once Vendor and driver version is set, this will return if it has the applicable bug passed to it.
|
||||||
bool HasBug(Bug bug);
|
bool HasBug(Bug bug);
|
||||||
|
@ -411,13 +411,6 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
|
|||||||
// divide
|
// divide
|
||||||
out.Write("o.pos.z = o.pos.w + o.pos.z * 2.0;\n");
|
out.Write("o.pos.z = o.pos.w + o.pos.z * 2.0;\n");
|
||||||
|
|
||||||
// Sonic Unleashed puts its final rendering at the near or
|
|
||||||
// far plane of the viewing frustrum(actually box, they use
|
|
||||||
// orthogonal projection for that), and we end up putting it
|
|
||||||
// just beyond, and the rendering gets clipped away. (The
|
|
||||||
// primitive gets dropped)
|
|
||||||
out.Write("o.pos.z = o.pos.z * 1048575.0/1048576.0;\n");
|
|
||||||
|
|
||||||
// the next steps of the OGL pipeline are:
|
// the next steps of the OGL pipeline are:
|
||||||
// (x_c,y_c,z_c,w_c) = o.pos //switch to OGL spec terminology
|
// (x_c,y_c,z_c,w_c) = o.pos //switch to OGL spec terminology
|
||||||
// clipping to -w_c <= (x_c,y_c,z_c) <= w_c
|
// clipping to -w_c <= (x_c,y_c,z_c) <= w_c
|
||||||
|
@ -411,9 +411,10 @@ void VertexShaderManager::SetConstants()
|
|||||||
|
|
||||||
g_fProjectionMatrix[12] = 0.0f;
|
g_fProjectionMatrix[12] = 0.0f;
|
||||||
g_fProjectionMatrix[13] = 0.0f;
|
g_fProjectionMatrix[13] = 0.0f;
|
||||||
// donkopunchstania: GC GPU rounds differently?
|
// donkopunchstania suggested the GC GPU might round differently
|
||||||
// -(1 + epsilon) so objects are clipped as they are on the real HW
|
// He had thus changed this to -(1 + epsilon) to fix clipping issues.
|
||||||
g_fProjectionMatrix[14] = -1.00000011921f;
|
// I (neobrain) don't think his conjecture is true and thus reverted his change.
|
||||||
|
g_fProjectionMatrix[14] = -1.0f;
|
||||||
g_fProjectionMatrix[15] = 0.0f;
|
g_fProjectionMatrix[15] = 0.0f;
|
||||||
|
|
||||||
SETSTAT_FT(stats.gproj_0, g_fProjectionMatrix[0]);
|
SETSTAT_FT(stats.gproj_0, g_fProjectionMatrix[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user