mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
gl: Add mesa support for polygon offset
This commit is contained in:
parent
a229e30b08
commit
65d20f2d08
@ -267,7 +267,7 @@ void GLGSRender::update_draw_state()
|
||||
// Check details in VKDraw.cpp about behaviour of RSX vs desktop D24X8 implementations
|
||||
// TLDR, RSX expects R = 16,777,215 (2^24 - 1)
|
||||
const auto& caps = gl::get_driver_caps();
|
||||
if (caps.vendor_NVIDIA)
|
||||
if (caps.vendor_NVIDIA || caps.vendor_MESA)
|
||||
{
|
||||
// R derived to be 8388607 (2^23 - 1)
|
||||
poly_offset_bias *= 0.5f;
|
||||
|
@ -30,6 +30,8 @@ namespace gl
|
||||
bool vendor_AMD = false; // has broken ARB_multidraw
|
||||
bool vendor_NVIDIA = false; // has NaN poisoning issues
|
||||
bool vendor_MESA = false; // requires CLIENT_STORAGE bit set for streaming buffers
|
||||
bool subvendor_RADEONSI = false;
|
||||
bool subvendor_NOUVEAU = false;
|
||||
|
||||
bool check(const std::string& ext_name, const char* test)
|
||||
{
|
||||
@ -174,6 +176,15 @@ namespace gl
|
||||
if (version_string.find("Mesa") != umax || renderer_string.find("Mesa") != umax)
|
||||
{
|
||||
vendor_MESA = true;
|
||||
|
||||
if (vendor_string.find("nouveau") != umax)
|
||||
{
|
||||
subvendor_NOUVEAU = true;
|
||||
}
|
||||
else if (vendor_string.find("AMD") != umax)
|
||||
{
|
||||
subvendor_RADEONSI = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Workaround for intel drivers which have terrible capability reporting
|
||||
|
Loading…
x
Reference in New Issue
Block a user