mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-06 09:06:55 +00:00
Delete disabled code to use built-in alpha test on DX9.
This commit is contained in:
parent
85229efef4
commit
838e53f482
@ -237,14 +237,6 @@ void ComputeFragmentShaderID(ShaderID *id_out, uint32_t vertType) {
|
||||
}
|
||||
|
||||
id.SetBit(FS_BIT_LMODE, lmode);
|
||||
#if !defined(DX9_USE_HW_ALPHA_TEST)
|
||||
if (enableAlphaTest) {
|
||||
// 5 bits total.
|
||||
id.SetBit(FS_BIT_ALPHA_TEST);
|
||||
id.SetBits(FS_BIT_ALPHA_TEST_FUNC, 3, gstate.getAlphaTestFunction());
|
||||
id.SetBit(FS_BIT_ALPHA_AGAINST_ZERO, IsAlphaTestAgainstZero());
|
||||
}
|
||||
#endif
|
||||
if (enableColorTest) {
|
||||
// 4 bits total.
|
||||
id.SetBit(FS_BIT_COLOR_TEST);
|
||||
|
@ -238,7 +238,6 @@ bool GenerateFragmentShaderDX9(const ShaderID &id, char *buffer) {
|
||||
WRITE(p, " float4 v = In.v_color0 %s;\n", secondary);
|
||||
}
|
||||
|
||||
#if !defined(DX9_USE_HW_ALPHA_TEST)
|
||||
if (enableAlphaTest) {
|
||||
if (alphaTestAgainstZero) {
|
||||
// When testing against 0 (extremely common), we can avoid some math.
|
||||
@ -264,7 +263,6 @@ bool GenerateFragmentShaderDX9(const ShaderID &id, char *buffer) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (enableColorTest) {
|
||||
if (colorTestAgainstZero) {
|
||||
// When testing against 0 (common), we can avoid some math.
|
||||
|
@ -21,9 +21,6 @@
|
||||
|
||||
#include "GPU/Common/ShaderId.h"
|
||||
|
||||
// TODO: Bench both ways. Result may be different on old vs new hardware though..
|
||||
// #define DX9_USE_HW_ALPHA_TEST 1
|
||||
|
||||
namespace DX9 {
|
||||
|
||||
bool GenerateFragmentShaderDX9(const ShaderID &id, char *buffer);
|
||||
|
@ -635,19 +635,6 @@ void TransformDrawEngineDX9::ApplyDrawState(int prim) {
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(DX9_USE_HW_ALPHA_TEST)
|
||||
// Older hardware (our target for DX9) often has separate alpha testing hardware that
|
||||
// is generally faster than using discard/clip. Let's use it.
|
||||
if (gstate.alphaTestEnable) {
|
||||
dxstate.alphaTest.enable();
|
||||
GEComparison alphaTestFunc = gstate.getAlphaTestFunction();
|
||||
dxstate.alphaTestFunc.set(ztests[alphaTestFunc]);
|
||||
dxstate.alphaTestRef.set(gstate.getAlphaTestRef());
|
||||
} else {
|
||||
dxstate.alphaTest.disable();
|
||||
}
|
||||
#endif
|
||||
|
||||
float renderWidthFactor, renderHeightFactor;
|
||||
float renderWidth, renderHeight;
|
||||
float renderX, renderY;
|
||||
|
Loading…
x
Reference in New Issue
Block a user