Remove some D3D9 leftovers

This commit is contained in:
Henrik Rydgård
2025-06-10 16:59:14 +02:00
parent 87baa69ce4
commit dae0d11809
4 changed files with 2 additions and 70 deletions
+1 -6
View File
@@ -172,7 +172,7 @@ enum class CullMode : uint8_t {
NONE,
FRONT,
BACK,
FRONT_AND_BACK, // Not supported on D3D9
FRONT_AND_BACK,
};
enum class Facing {
@@ -798,11 +798,6 @@ public:
// Framebuffer fetch / input attachment support, needs to be explicit in Vulkan.
virtual void BindCurrentFramebufferForColorInput() {}
// deprecated, only used by D3D9
virtual uintptr_t GetFramebufferAPITexture(Framebuffer *fbo, Aspect aspect, int attachment) {
return 0;
}
virtual void GetFramebufferDimensions(Framebuffer *fbo, int *w, int *h) = 0;
// Could be useful in OpenGL ES to give hints about framebuffers on tiler GPUs
-21
View File
@@ -23,27 +23,6 @@
struct FShaderID;
// D3D9 float constants
#define CONST_PS_TEXENV 0
#define CONST_PS_ALPHACOLORREF 1
#define CONST_PS_ALPHACOLORMASK 2
#define CONST_PS_FOGCOLOR 3
#define CONST_PS_STENCILREPLACE 4
#define CONST_PS_BLENDFIXA 5
#define CONST_PS_BLENDFIXB 6
#define CONST_PS_FBOTEXSIZE 7
#define CONST_PS_TEXCLAMP 8
#define CONST_PS_TEXCLAMPOFF 9
#define CONST_PS_MIPBIAS 10
#define CONST_PS_TEX_NO_ALPHA_MUL 11
// For stencil upload
#define BCONST_PS_STENCILVALUE 13
// D3D9 bool constants, they have their own register space.
// Can technically be deduced from the fragment shader ID, but this is safer.
enum class FragmentShaderFlags : u32 {
USES_DISCARD = 2,
-36
View File
@@ -32,39 +32,3 @@ enum class VertexShaderFlags : u32 {
ENUM_CLASS_BITOPS(VertexShaderFlags);
bool GenerateVertexShader(const VShaderID &id, char *buffer, const ShaderLanguageDesc &compat, const Draw::Bugs bugs, uint32_t *attrMask, uint64_t *uniformMask, VertexShaderFlags *vertexShaderFlags, std::string *errorString);
// D3D9 constants.
enum {
CONST_VS_PROJ = 0,
CONST_VS_PROJ_THROUGH = 4,
CONST_VS_VIEW = 8,
CONST_VS_WORLD = 11,
CONST_VS_TEXMTX = 14,
CONST_VS_UVSCALEOFFSET = 17,
CONST_VS_FOGCOEF = 18,
CONST_VS_AMBIENT = 19,
CONST_VS_MATAMBIENTALPHA = 20,
CONST_VS_MATDIFFUSE = 21,
CONST_VS_MATSPECULAR = 22,
CONST_VS_MATEMISSIVE = 23,
CONST_VS_LIGHTPOS = 24,
CONST_VS_LIGHTDIR = 28,
CONST_VS_LIGHTATT = 32,
CONST_VS_LIGHTANGLE_SPOTCOEF = 36,
CONST_VS_LIGHTDIFFUSE = 40,
CONST_VS_LIGHTSPECULAR = 44,
CONST_VS_LIGHTAMBIENT = 48,
CONST_VS_DEPTHRANGE = 52,
CONST_VS_BONE0 = 53,
CONST_VS_BONE1 = 56,
CONST_VS_BONE2 = 59,
CONST_VS_BONE3 = 62,
CONST_VS_BONE4 = 65,
CONST_VS_BONE5 = 68,
CONST_VS_BONE6 = 71,
CONST_VS_BONE7 = 74,
CONST_VS_BONE8 = 77,
CONST_VS_CULLRANGEMIN = 80,
CONST_VS_CULLRANGEMAX = 81,
CONST_VS_ROTATION = 82,
};
+1 -7
View File
@@ -133,19 +133,13 @@ LibretroGraphicsContext *LibretroGraphicsContext::CreateGraphicsContext() {
#endif
#ifdef _WIN32
if (preferred == RETRO_HW_CONTEXT_DUMMY || preferred == RETRO_HW_CONTEXT_DIRECT3D) {
if (preferred == RETRO_HW_CONTEXT_DUMMY) {
ctx = new LibretroD3D11Context();
if (ctx->Init()) {
return ctx;
}
delete ctx;
ctx = new LibretroD3D9Context();
if (ctx->Init()) {
return ctx;
}
delete ctx;
}
#endif