mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
D3D9 bool constants have a separate register space, oops.
This commit is contained in:
parent
d4ce134292
commit
5022ddc4fc
3 changed files with 9 additions and 7 deletions
|
@ -260,7 +260,7 @@ bool GenerateFragmentShader(const FShaderID &id, char *buffer, const ShaderLangu
|
|||
if (texFunc == GE_TEXFUNC_BLEND) {
|
||||
WRITE(p, "float3 u_texenv : register(c%i);\n", CONST_PS_TEXENV);
|
||||
}
|
||||
WRITE(p, "bool u_texAlpha : register(c%i);\n", CONST_PS_TEXALPHA);
|
||||
WRITE(p, "bool u_texAlpha : register(b%i);\n", CONST_PS_TEXALPHA); // NOTE! "b" register, not "c"!
|
||||
}
|
||||
WRITE(p, "float3 u_fogcolor : register(c%i);\n", CONST_PS_FOGCOLOR);
|
||||
if (texture3D) {
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
struct FShaderID;
|
||||
|
||||
// D3D9 constants
|
||||
// D3D9 float constants
|
||||
|
||||
#define CONST_PS_TEXENV 0
|
||||
#define CONST_PS_ALPHACOLORREF 1
|
||||
|
@ -36,10 +36,13 @@ struct FShaderID;
|
|||
#define CONST_PS_TEXCLAMP 8
|
||||
#define CONST_PS_TEXCLAMPOFF 9
|
||||
#define CONST_PS_MIPBIAS 10
|
||||
#define CONST_PS_TEXALPHA 11
|
||||
|
||||
// For stencil upload
|
||||
#define CONST_PS_STENCILVALUE 12
|
||||
#define BCONST_PS_STENCILVALUE 11
|
||||
|
||||
// D3D9 bool constants, they have their own register space.
|
||||
#define CONST_PS_TEXALPHA 0
|
||||
|
||||
|
||||
// Can technically be deduced from the fragment shader ID, but this is safer.
|
||||
enum class FragmentShaderFlags : u32 {
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
|
||||
#include "Common/CommonFuncs.h"
|
||||
|
||||
// TODO: There will be additional bits, indicating that groups of these will be
|
||||
// sent to the shader and processed there. This will cut down the number of shaders ("ubershader approach")
|
||||
// This is probably only really worth doing for lighting and bones.
|
||||
// VS_BIT_LIGHT_UBERSHADER indicates that some groups of these will be
|
||||
// sent to the shader and processed there. This cuts down the number of shaders ("ubershader approach").
|
||||
enum VShaderBit : uint8_t {
|
||||
VS_BIT_LMODE = 0,
|
||||
VS_BIT_IS_THROUGH = 1,
|
||||
|
|
Loading…
Add table
Reference in a new issue