mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Remove redundant flag from vertex shader IDs
This commit is contained in:
@@ -18,7 +18,6 @@ std::string VertexShaderDesc(const VShaderID &id) {
|
||||
std::stringstream desc;
|
||||
desc << StringFromFormat("%08x:%08x ", id.d[1], id.d[0]);
|
||||
if (id.Bit(VS_BIT_IS_THROUGH)) desc << "THR ";
|
||||
if (id.Bit(VS_BIT_CLIP_ENABLE)) desc << "Clip ";
|
||||
if (id.Bit(VS_BIT_USE_HW_TRANSFORM)) desc << "HWX ";
|
||||
if (id.Bit(VS_BIT_HAS_COLOR)) desc << "C ";
|
||||
if (id.Bit(VS_BIT_HAS_TEXCOORD)) desc << "T ";
|
||||
@@ -97,7 +96,6 @@ void ComputeVertexShaderID(VShaderID *id_out, u32 vertType, bool useHWTransform,
|
||||
id.SetBit(VS_BIT_LMODE, lmode);
|
||||
id.SetBit(VS_BIT_IS_THROUGH, isModeThrough);
|
||||
id.SetBit(VS_BIT_HAS_COLOR, vtypeHasColor);
|
||||
id.SetBit(VS_BIT_CLIP_ENABLE, gstate.isDepthClipEnabled());
|
||||
id.SetBit(VS_BIT_VERTEX_RANGE_CULLING, vertexRangeCulling);
|
||||
|
||||
if (!isModeThrough && gstate_c.Use(GPU_USE_SINGLE_PASS_STEREO)) {
|
||||
|
||||
@@ -28,7 +28,7 @@ enum VShaderBit : uint8_t {
|
||||
VS_BIT_IS_THROUGH = 1,
|
||||
// bit 2 is free.
|
||||
VS_BIT_HAS_COLOR = 3,
|
||||
VS_BIT_CLIP_ENABLE = 4,
|
||||
// bit 4 is free.
|
||||
VS_BIT_VERTEX_RANGE_CULLING = 5,
|
||||
VS_BIT_SIMPLE_STEREO = 6,
|
||||
// bit 7 is free,
|
||||
|
||||
@@ -134,7 +134,6 @@ bool GenerateVertexShader(const VShaderID &id, char *buffer, const ShaderLanguag
|
||||
const bool isModeThrough = id.Bit(VS_BIT_IS_THROUGH);
|
||||
const bool useHWTransform = id.Bit(VS_BIT_USE_HW_TRANSFORM);
|
||||
|
||||
const bool clipEnable = id.Bit(VS_BIT_CLIP_ENABLE) && !isModeThrough; // this is the PSP clip flag, which has some various consequences.
|
||||
const bool clipNearPlane = gstate_c.Use(GPU_USE_CLIP_DISTANCE) && useHWTransform;
|
||||
const bool clipMinMax = gstate_c.Use(GPU_USE_CLIP_DISTANCE) && !isModeThrough; // If clip planes are available, we want to use them for min/max. We skip the min/max culling in software transform (not yet implemented).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user