GPUDevice: Support geometry shaders

This commit is contained in:
Stenzek
2023-09-02 22:09:20 +10:00
parent 4fc984e082
commit e804b5e701
22 changed files with 121 additions and 44 deletions

View File

@@ -41,7 +41,7 @@ class OpenGLPipeline final : public GPUPipeline
friend OpenGLDevice;
public:
static constexpr u32 MAX_VERTEX_ATTRIBUTES = 6;
static constexpr u32 MAX_VERTEX_ATTRIBUTES = 7;
struct VertexArrayCacheKey
{
@@ -65,14 +65,18 @@ public:
struct ProgramCacheKey
{
GPUShaderCache::CacheIndexKey vs_key;
GPUShaderCache::CacheIndexKey fs_key;
u64 vs_hash_low, vs_hash_high;
u64 gs_hash_low, gs_hash_high;
u64 fs_hash_low, fs_hash_high;
u32 vs_length;
u32 gs_length;
u32 fs_length;
VertexArrayCacheKey va_key;
bool operator==(const ProgramCacheKey& rhs) const;
bool operator!=(const ProgramCacheKey& rhs) const;
};
static_assert(sizeof(ProgramCacheKey) == 112); // Has no padding
static_assert(sizeof(ProgramCacheKey) == 96); // Has no padding
struct ProgramCacheKeyHash
{
size_t operator()(const ProgramCacheKey& k) const;