summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/OGLConfig.h
blob: 2b78c35c2b091327f7d2baa2dabdea531d0de5bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// Copyright 2023 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "Common/CommonTypes.h"

class GLContext;

namespace OGL
{
enum GlslVersion
{
  Glsl130,
  Glsl140,
  Glsl150,
  Glsl330,
  Glsl400,    // and above
  Glsl430,    // 430 - 440
  Glsl450,    // 450 - xxx
  GlslEs300,  // GLES 3.0
  GlslEs310,  // GLES 3.1
  GlslEs320,  // GLES 3.2
};

enum class EsPointSizeType
{
  PointSizeNone,
  PointSizeOes,
  PointSizeExt,
};

enum class EsTexbufType
{
  TexbufNone,
  TexbufCore,
  TexbufOes,
  TexbufExt
};

enum class EsFbFetchType
{
  FbFetchNone,
  FbFetchExt,
  FbFetchArm,
};

enum class MultisampleTexStorageType
{
  TexStorageNone,
  TexStorageCore,
  TexStorageOes,
};

// ogl-only config, so not in VideoConfig.h
struct VideoConfig
{
  bool bIsES;
  bool bSupportsGLPinnedMemory;
  bool bSupportsGLSync;
  bool bSupportsGLBaseVertex;
  bool bSupportsGLBufferStorage;
  bool bSupportsMSAA;
  GlslVersion eSupportedGLSLVersion;
  bool bSupportViewportFloat;
  bool bSupportsAEP;
  bool bSupportsDebug;
  bool bSupportsCopySubImage;
  EsPointSizeType SupportedESPointSize;
  EsTexbufType SupportedESTextureBuffer;
  bool bSupportsTextureStorage;
  MultisampleTexStorageType SupportedMultisampleTexStorage;
  bool bSupportsConservativeDepth;
  bool bSupportsImageLoadStore;
  bool bSupportsAniso;
  bool bSupportsBitfield;
  bool bSupportsTextureSubImage;
  EsFbFetchType SupportedFramebufferFetch;
  bool bSupportsKHRShaderSubgroup;  // basic + arithmetic + ballot
  bool bSupportsExplicitLayoutInShader;

  const char* gl_vendor;
  const char* gl_renderer;
  const char* gl_version;
};

void InitDriverInfo();
bool PopulateConfig(GLContext* main_gl_context);

extern VideoConfig g_ogl_config;

}  // namespace OGL