2019-04-10 20:56:12 +02:00
|
|
|
// Copyright 2019 yuzu Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstddef>
|
2019-04-30 05:09:51 +02:00
|
|
|
#include "common/common_types.h"
|
2019-04-10 20:56:12 +02:00
|
|
|
|
|
|
|
namespace OpenGL {
|
|
|
|
|
|
|
|
class Device {
|
|
|
|
public:
|
2019-04-30 05:09:51 +02:00
|
|
|
explicit Device();
|
|
|
|
explicit Device(std::nullptr_t);
|
2019-04-10 20:56:12 +02:00
|
|
|
|
|
|
|
std::size_t GetUniformBufferAlignment() const {
|
|
|
|
return uniform_buffer_alignment;
|
|
|
|
}
|
|
|
|
|
2019-06-01 22:41:55 +02:00
|
|
|
std::size_t GetShaderStorageBufferAlignment() const {
|
|
|
|
return shader_storage_alignment;
|
|
|
|
}
|
|
|
|
|
2019-04-30 05:09:51 +02:00
|
|
|
u32 GetMaxVertexAttributes() const {
|
|
|
|
return max_vertex_attributes;
|
|
|
|
}
|
|
|
|
|
|
|
|
u32 GetMaxVaryings() const {
|
|
|
|
return max_varyings;
|
|
|
|
}
|
|
|
|
|
2019-07-08 01:36:42 +02:00
|
|
|
bool HasVertexViewportLayer() const {
|
|
|
|
return has_vertex_viewport_layer;
|
|
|
|
}
|
|
|
|
|
2019-04-10 23:03:52 +02:00
|
|
|
bool HasVariableAoffi() const {
|
|
|
|
return has_variable_aoffi;
|
|
|
|
}
|
|
|
|
|
2019-05-24 01:19:56 +02:00
|
|
|
bool HasComponentIndexingBug() const {
|
|
|
|
return has_component_indexing_bug;
|
|
|
|
}
|
|
|
|
|
2019-04-10 20:56:12 +02:00
|
|
|
private:
|
2019-04-10 23:03:52 +02:00
|
|
|
static bool TestVariableAoffi();
|
2019-05-24 01:19:56 +02:00
|
|
|
static bool TestComponentIndexingBug();
|
2019-04-10 23:03:52 +02:00
|
|
|
|
2019-04-10 20:56:12 +02:00
|
|
|
std::size_t uniform_buffer_alignment{};
|
2019-06-01 22:41:55 +02:00
|
|
|
std::size_t shader_storage_alignment{};
|
2019-04-30 05:09:51 +02:00
|
|
|
u32 max_vertex_attributes{};
|
|
|
|
u32 max_varyings{};
|
2019-07-08 01:36:42 +02:00
|
|
|
bool has_vertex_viewport_layer{};
|
2019-04-10 23:03:52 +02:00
|
|
|
bool has_variable_aoffi{};
|
2019-05-24 01:19:56 +02:00
|
|
|
bool has_component_indexing_bug{};
|
2019-04-10 20:56:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace OpenGL
|