bool forceWindowed = false;
bool quadLayoutEnabled = false;
bool veryEarlyDepthTest = true;
- bool complementaryDepthBuffer = false;
bool postBlendSRGB = false;
bool exactColorRounding = false;
TransparencyAntialiasing transparencyAntialiasing = TRANSPARENCY_NONE;
namespace sw
{
- extern bool complementaryDepthBuffer;
extern TransparencyAntialiasing transparencyAntialiasing;
extern bool perspectiveCorrection;
namespace sw
{
extern bool veryEarlyDepthTest;
- extern bool complementaryDepthBuffer;
extern bool fullPixelPositionRegister;
extern int clusterCount;
zValue = *Pointer<Float4>(buffer, 16);
}
- Int4 zTest;
-
- if(complementaryDepthBuffer)
- {
- zTest = CmpLE(zValue, z);
- }
- else
- {
- zTest = CmpNLT(zValue, z);
- }
+ Int4 zTest = CmpNLT(zValue, z);
Int zMask = SignMask(zTest);
extern bool colorsDefaultToZero;
extern bool forceWindowed;
- extern bool complementaryDepthBuffer;
extern bool postBlendSRGB;
extern bool exactColorRounding;
extern TransparencyAntialiasing transparencyAntialiasing;
N += context->depthBias;
}
- if(complementaryDepthBuffer)
- {
- Z = -Z;
- N = 1 - N;
- }
-
data->Wx16 = replicate(W * 16);
data->Hx16 = replicate(H * 16);
data->X0x16 = replicate(X0 * 16 - 8);
}
forceWindowed = configuration.forceWindowed;
- complementaryDepthBuffer = configuration.complementaryDepthBuffer;
postBlendSRGB = configuration.postBlendSRGB;
exactColorRounding = configuration.exactColorRounding;
forceClearRegisters = configuration.forceClearRegisters;
namespace sw
{
- extern bool complementaryDepthBuffer;
extern bool fullPixelPositionRegister;
bool precacheSetup = false;
namespace sw
{
extern bool quadLayoutEnabled;
- extern bool complementaryDepthBuffer;
extern TranscendentalPrecision logPrecision;
void Surface::Buffer::write(int x, int y, int z, const Color<float> &color)
}
else // Quad layout
{
- if(complementaryDepthBuffer)
- {
- depth = 1 - depth;
- }
-
float *buffer = (float*)lockInternal(0, 0, 0, lock, PUBLIC);
int oddX0 = (x0 & ~1) * 2 + (x0 & 1);
html += "<table>\n";
html += "<tr><td>Disable SwiftConfig server:</td><td><input name = 'disableServer' type='checkbox'" + (config.disableServer == true ? checked : empty) + " title='If checked disables the web browser based control panel.'></td></tr>";
html += "<tr><td>Force windowed mode:</td><td><input name = 'forceWindowed' type='checkbox'" + (config.forceWindowed == true ? checked : empty) + " title='If checked prevents the application from switching to full-screen mode.'></td></tr>";
- html += "<tr><td>Complementary depth buffer:</td><td><input name = 'complementaryDepthBuffer' type='checkbox'" + (config.complementaryDepthBuffer == true ? checked : empty) + " title='If checked causes 1 - z to be stored in the depth buffer.'></td></tr>";
html += "<tr><td>Post alpha blend sRGB conversion:</td><td><input name = 'postBlendSRGB' type='checkbox'" + (config.postBlendSRGB == true ? checked : empty) + " title='If checked alpha blending is performed in linear color space.'></td></tr>";
html += "<tr><td>Exact color rounding:</td><td><input name = 'exactColorRounding' type='checkbox'" + (config.exactColorRounding == true ? checked : empty) + " title='If checked color rounding is done at high accuracy.'></td></tr>";
html += "<tr><td>Disable alpha display formats:</td><td><input name = 'disableAlphaMode' type='checkbox'" + (config.disableAlphaMode == true ? checked : empty) + " title='If checked the device does not advertise the A8R8G8B8 display mode.'></td></tr>";
config.enableSSE4_1 = false;
config.disableServer = false;
config.forceWindowed = false;
- config.complementaryDepthBuffer = false;
config.postBlendSRGB = false;
config.exactColorRounding = false;
config.disableAlphaMode = false;
{
config.forceWindowed = true;
}
- else if(strstr(post, "complementaryDepthBuffer=on"))
- {
- config.complementaryDepthBuffer = true;
- }
else if(strstr(post, "postBlendSRGB=on"))
{
config.postBlendSRGB = true;
config.disableServer = ini.getBoolean("Testing", "DisableServer", false);
config.forceWindowed = ini.getBoolean("Testing", "ForceWindowed", false);
- config.complementaryDepthBuffer = ini.getBoolean("Testing", "ComplementaryDepthBuffer", false);
config.postBlendSRGB = ini.getBoolean("Testing", "PostBlendSRGB", false);
config.exactColorRounding = ini.getBoolean("Testing", "ExactColorRounding", true);
config.disableAlphaMode = ini.getBoolean("Testing", "DisableAlphaMode", false);
ini.addValue("Testing", "DisableServer", itoa(config.disableServer));
ini.addValue("Testing", "ForceWindowed", itoa(config.forceWindowed));
- ini.addValue("Testing", "ComplementaryDepthBuffer", itoa(config.complementaryDepthBuffer));
ini.addValue("Testing", "PostBlendSRGB", itoa(config.postBlendSRGB));
ini.addValue("Testing", "ExactColorRounding", itoa(config.exactColorRounding));
ini.addValue("Testing", "DisableAlphaMode", itoa(config.disableAlphaMode));
bool disableServer;
bool keepSystemCursor;
bool forceWindowed;
- bool complementaryDepthBuffer;
bool postBlendSRGB;
bool exactColorRounding;
bool disableAlphaMode;
namespace sw
{
- extern bool complementaryDepthBuffer;
extern bool postBlendSRGB;
extern bool exactColorRounding;
extern bool forceClearRegisters;
if(spirvShader && spirvShader->getModes().DepthReplacing)
{
- if(complementaryDepthBuffer)
- {
- Z = Float4(1.0f) - oDepth;
- }
- else
- {
- Z = oDepth;
- }
+ Z = oDepth;
}
Pointer<Byte> buffer;
zTest = CmpNEQ(zValue, Z);
break;
case VK_COMPARE_OP_LESS:
- if(complementaryDepthBuffer)
- {
- zTest = CmpLT(zValue, Z);
- }
- else
- {
- zTest = CmpNLE(zValue, Z);
- }
+ zTest = CmpNLE(zValue, Z);
break;
case VK_COMPARE_OP_GREATER_OR_EQUAL:
- if(complementaryDepthBuffer)
- {
- zTest = CmpNLT(zValue, Z);
- }
- else
- {
- zTest = CmpLE(zValue, Z);
- }
+ zTest = CmpLE(zValue, Z);
break;
case VK_COMPARE_OP_LESS_OR_EQUAL:
- if(complementaryDepthBuffer)
- {
- zTest = CmpLE(zValue, Z);
- }
- else
- {
- zTest = CmpNLT(zValue, Z);
- }
+ zTest = CmpNLT(zValue, Z);
break;
case VK_COMPARE_OP_GREATER:
- if(complementaryDepthBuffer)
- {
- zTest = CmpNLE(zValue, Z);
- }
- else
- {
- zTest = CmpLT(zValue, Z);
- }
+ zTest = CmpLT(zValue, Z);
break;
default:
ASSERT(false);
if(spirvShader && spirvShader->getModes().DepthReplacing)
{
- if(complementaryDepthBuffer)
- {
- Z = Float4(1.0f) - oDepth;
- }
- else
- {
- Z = oDepth;
- }
+ Z = oDepth;
}
Pointer<Byte> buffer;
namespace sw
{
- extern bool complementaryDepthBuffer;
extern TranscendentalPrecision logPrecision;
extern bool leadingVertexFirst;
Float bias = Max(Abs(Float(A.x)), Abs(Float(B.x)));
bias *= *Pointer<Float>(data + OFFSET(DrawData,slopeDepthBias));
- if(complementaryDepthBuffer)
- {
- bias = -bias;
- }
-
c += bias;
}