Reorder the GPU USE flags a bit

This commit is contained in:
Henrik Rydgård 2022-10-17 09:34:26 +02:00
parent 7db6467af9
commit 7c5fc3ccb5
4 changed files with 8 additions and 11 deletions

View File

@ -474,6 +474,7 @@ bool DrawEngineGLES::IsCodePtrVertexDecoder(const u8 *ptr) const {
return decJitCache_->IsInSpace(ptr);
}
// TODO: Refactor this to a single USE flag.
bool DrawEngineGLES::SupportsHWTessellation() const {
bool hasTexelFetch = gl_extensions.GLES3 || (!gl_extensions.IsGLES && gl_extensions.VersionGEThan(3, 3, 0)) || gl_extensions.EXT_gpu_shader4;
return hasTexelFetch && gstate_c.UseAll(GPU_USE_VERTEX_TEXTURE_FETCH | GPU_USE_TEXTURE_FLOAT | GPU_USE_INSTANCE_RENDERING);

View File

@ -935,7 +935,7 @@ std::string ShaderManagerGLES::DebugGetShaderString(std::string id, DebugShaderT
// as sometimes these features might have an effect on the ID bits.
#define CACHE_HEADER_MAGIC 0x83277592
#define CACHE_VERSION 15
#define CACHE_VERSION 16
struct CacheHeader {
uint32_t magic;
uint32_t version;

View File

@ -478,7 +478,7 @@ enum {
GPU_USE_BLEND_MINMAX = FLAG_BIT(4),
GPU_USE_LOGIC_OP = FLAG_BIT(5),
GPU_USE_DEPTH_RANGE_HACK = FLAG_BIT(6),
// Free bit: 7
GPU_USE_TEXTURE_NPOT = FLAG_BIT(7),
GPU_USE_ANISOTROPY = FLAG_BIT(8),
GPU_USE_CLEAR_RAM_HACK = FLAG_BIT(9),
GPU_USE_INSTANCE_RENDERING = FLAG_BIT(10),
@ -486,21 +486,17 @@ enum {
GPU_USE_TEXTURE_FLOAT = FLAG_BIT(12),
GPU_USE_16BIT_FORMATS = FLAG_BIT(13),
GPU_USE_DEPTH_CLAMP = FLAG_BIT(14),
// Free bit: 15
GPU_USE_TEXTURE_LOD_CONTROL = FLAG_BIT(15),
GPU_USE_DEPTH_TEXTURE = FLAG_BIT(16),
GPU_USE_ACCURATE_DEPTH = FLAG_BIT(17),
GPU_USE_GS_CULLING = FLAG_BIT(18), // Geometry shader
// Free bit: 19
GPU_USE_REVERSE_COLOR_ORDER = FLAG_BIT(19),
GPU_USE_FRAMEBUFFER_FETCH = FLAG_BIT(20),
GPU_SCALE_DEPTH_FROM_24BIT_TO_16BIT = FLAG_BIT(21),
GPU_ROUND_FRAGMENT_DEPTH_TO_16BIT = FLAG_BIT(22),
GPU_ROUND_DEPTH_TO_16BIT = FLAG_BIT(23), // Can be disabled either per game or if we use a real 16-bit depth buffer
GPU_USE_TEXTURE_LOD_CONTROL = FLAG_BIT(24),
// Free bits: 25-27
GPU_USE_TEXTURE_NPOT = FLAG_BIT(28),
GPU_USE_CLIP_DISTANCE = FLAG_BIT(29),
GPU_USE_CULL_DISTANCE = FLAG_BIT(30),
GPU_USE_REVERSE_COLOR_ORDER = FLAG_BIT(31),
GPU_USE_CLIP_DISTANCE = FLAG_BIT(24),
GPU_USE_CULL_DISTANCE = FLAG_BIT(25),
};
struct KnownVertexBounds {

View File

@ -482,7 +482,7 @@ VulkanGeometryShader *ShaderManagerVulkan::GetGeometryShaderFromModule(VkShaderM
// instantaneous.
#define CACHE_HEADER_MAGIC 0xff51f420
#define CACHE_VERSION 29
#define CACHE_VERSION 30
struct VulkanCacheHeader {
uint32_t magic;
uint32_t version;