mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Merge pull request #4467 from stenzek/gpu-texture-decoding
VideoBackends: GPU Texture Decoding
This commit is contained in:
@ -72,6 +72,7 @@
|
||||
<ClInclude Include="GL\GLExtensions\ARB_blend_func_extended.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_buffer_storage.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_clip_control.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_compute_shader.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_copy_image.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_debug_output.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_draw_elements_base_vertex.h" />
|
||||
@ -83,9 +84,11 @@
|
||||
<ClInclude Include="GL\GLExtensions\ARB_occlusion_query2.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_sampler_objects.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_sample_shading.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_shader_image_load_store.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_shader_storage_buffer_object.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_sync.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_texture_multisample.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_texture_storage.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_texture_storage_multisample.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_uniform_buffer_object.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_vertex_array_object.h" />
|
||||
|
@ -238,6 +238,16 @@
|
||||
<ClInclude Include="NonCopyable.h" />
|
||||
<ClInclude Include="Analytics.h" />
|
||||
<ClInclude Include="Semaphore.h" />
|
||||
<ClInclude Include="MD5.h" />
|
||||
<ClInclude Include="GL\GLExtensions\ARB_texture_storage.h">
|
||||
<Filter>GL\GLExtensions</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="GL\GLExtensions\ARB_shader_image_load_store.h">
|
||||
<Filter>GL\GLExtensions</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="GL\GLExtensions\ARB_compute_shader.h">
|
||||
<Filter>GL\GLExtensions</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CDUtils.cpp" />
|
||||
@ -303,6 +313,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="ucrtFreadWorkaround.cpp" />
|
||||
<ClCompile Include="Analytics.cpp" />
|
||||
<ClCompile Include="MD5.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="CMakeLists.txt" />
|
||||
|
53
Source/Core/Common/GL/GLExtensions/ARB_compute_shader.h
Normal file
53
Source/Core/Common/GL/GLExtensions/ARB_compute_shader.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
** Copyright (c) 2013-2015 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#include "Common/GL/GLExtensions/gl_common.h"
|
||||
|
||||
#define GL_COMPUTE_SHADER 0x91B9
|
||||
#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB
|
||||
#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC
|
||||
#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD
|
||||
#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262
|
||||
#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263
|
||||
#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264
|
||||
#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265
|
||||
#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266
|
||||
#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB
|
||||
#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE
|
||||
#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF
|
||||
#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267
|
||||
#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC
|
||||
#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED
|
||||
#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE
|
||||
#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
|
||||
#define GL_COMPUTE_SHADER_BIT 0x00000020
|
||||
|
||||
typedef void(APIENTRYP PFNDOLDISPATCHCOMPUTEPROC)(GLuint num_groups_x, GLuint num_groups_y,
|
||||
GLuint num_groups_z);
|
||||
typedef void(APIENTRYP PFNDOLDISPATCHCOMPUTEINDIRECTPROC)(GLintptr indirect);
|
||||
|
||||
extern PFNDOLDISPATCHCOMPUTEPROC dolDispatchCompute;
|
||||
extern PFNDOLDISPATCHCOMPUTEINDIRECTPROC dolDispatchComputeIndirect;
|
||||
|
||||
#define glDispatchCompute dolDispatchCompute
|
||||
#define glDispatchComputeIndirect dolDispatchComputeIndirect
|
100
Source/Core/Common/GL/GLExtensions/ARB_shader_image_load_store.h
Normal file
100
Source/Core/Common/GL/GLExtensions/ARB_shader_image_load_store.h
Normal file
@ -0,0 +1,100 @@
|
||||
/*
|
||||
** Copyright (c) 2013-2015 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#include "Common/GL/GLExtensions/gl_common.h"
|
||||
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
|
||||
#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002
|
||||
#define GL_UNIFORM_BARRIER_BIT 0x00000004
|
||||
#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008
|
||||
#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
|
||||
#define GL_COMMAND_BARRIER_BIT 0x00000040
|
||||
#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080
|
||||
#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100
|
||||
#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200
|
||||
#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400
|
||||
#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
|
||||
#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000
|
||||
#define GL_ALL_BARRIER_BITS 0xFFFFFFFF
|
||||
#define GL_MAX_IMAGE_UNITS 0x8F38
|
||||
#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39
|
||||
#define GL_IMAGE_BINDING_NAME 0x8F3A
|
||||
#define GL_IMAGE_BINDING_LEVEL 0x8F3B
|
||||
#define GL_IMAGE_BINDING_LAYERED 0x8F3C
|
||||
#define GL_IMAGE_BINDING_LAYER 0x8F3D
|
||||
#define GL_IMAGE_BINDING_ACCESS 0x8F3E
|
||||
#define GL_IMAGE_1D 0x904C
|
||||
#define GL_IMAGE_2D 0x904D
|
||||
#define GL_IMAGE_3D 0x904E
|
||||
#define GL_IMAGE_2D_RECT 0x904F
|
||||
#define GL_IMAGE_CUBE 0x9050
|
||||
#define GL_IMAGE_BUFFER 0x9051
|
||||
#define GL_IMAGE_1D_ARRAY 0x9052
|
||||
#define GL_IMAGE_2D_ARRAY 0x9053
|
||||
#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054
|
||||
#define GL_IMAGE_2D_MULTISAMPLE 0x9055
|
||||
#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056
|
||||
#define GL_INT_IMAGE_1D 0x9057
|
||||
#define GL_INT_IMAGE_2D 0x9058
|
||||
#define GL_INT_IMAGE_3D 0x9059
|
||||
#define GL_INT_IMAGE_2D_RECT 0x905A
|
||||
#define GL_INT_IMAGE_CUBE 0x905B
|
||||
#define GL_INT_IMAGE_BUFFER 0x905C
|
||||
#define GL_INT_IMAGE_1D_ARRAY 0x905D
|
||||
#define GL_INT_IMAGE_2D_ARRAY 0x905E
|
||||
#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F
|
||||
#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060
|
||||
#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061
|
||||
#define GL_UNSIGNED_INT_IMAGE_1D 0x9062
|
||||
#define GL_UNSIGNED_INT_IMAGE_2D 0x9063
|
||||
#define GL_UNSIGNED_INT_IMAGE_3D 0x9064
|
||||
#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065
|
||||
#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
|
||||
#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067
|
||||
#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068
|
||||
#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
|
||||
#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
|
||||
#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B
|
||||
#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C
|
||||
#define GL_MAX_IMAGE_SAMPLES 0x906D
|
||||
#define GL_IMAGE_BINDING_FORMAT 0x906E
|
||||
#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
|
||||
#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
|
||||
#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
|
||||
#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
|
||||
#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB
|
||||
#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC
|
||||
#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
|
||||
#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
|
||||
#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
|
||||
|
||||
typedef void(APIENTRYP PFNDOLBINDIMAGETEXTUREPROC)(GLuint unit, GLuint texture, GLint level,
|
||||
GLboolean layered, GLint layer, GLenum access,
|
||||
GLenum format);
|
||||
typedef void(APIENTRYP PFNDOLMEMORYBARRIERPROC)(GLbitfield barriers);
|
||||
|
||||
extern PFNDOLBINDIMAGETEXTUREPROC dolBindImageTexture;
|
||||
extern PFNDOLMEMORYBARRIERPROC dolMemoryBarrier;
|
||||
|
||||
#define glBindImageTexture dolBindImageTexture
|
||||
#define glMemoryBarrier dolMemoryBarrier
|
41
Source/Core/Common/GL/GLExtensions/ARB_texture_storage.h
Normal file
41
Source/Core/Common/GL/GLExtensions/ARB_texture_storage.h
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
** Copyright (c) 2013-2015 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#include "Common/GL/GLExtensions/gl_common.h"
|
||||
|
||||
#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
|
||||
|
||||
typedef void(APIENTRYP PFNDOLTEXSTORAGE1DPROC)(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
GLsizei width);
|
||||
typedef void(APIENTRYP PFNDOLTEXSTORAGE2DPROC)(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLTEXSTORAGE3DPROC)(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
GLsizei width, GLsizei height, GLsizei depth);
|
||||
|
||||
extern PFNDOLTEXSTORAGE1DPROC dolTexStorage1D;
|
||||
extern PFNDOLTEXSTORAGE2DPROC dolTexStorage2D;
|
||||
extern PFNDOLTEXSTORAGE3DPROC dolTexStorage3D;
|
||||
|
||||
#define glTexStorage1D dolTexStorage1D
|
||||
#define glTexStorage2D dolTexStorage2D
|
||||
#define glTexStorage3D dolTexStorage3D
|
@ -653,19 +653,12 @@ PFNDOLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC
|
||||
dolDrawElementsInstancedBaseVertexBaseInstance;
|
||||
PFNDOLGETINTERNALFORMATIVPROC dolGetInternalformativ;
|
||||
PFNDOLGETACTIVEATOMICCOUNTERBUFFERIVPROC dolGetActiveAtomicCounterBufferiv;
|
||||
PFNDOLBINDIMAGETEXTUREPROC dolBindImageTexture;
|
||||
PFNDOLMEMORYBARRIERPROC dolMemoryBarrier;
|
||||
PFNDOLTEXSTORAGE1DPROC dolTexStorage1D;
|
||||
PFNDOLTEXSTORAGE2DPROC dolTexStorage2D;
|
||||
PFNDOLTEXSTORAGE3DPROC dolTexStorage3D;
|
||||
PFNDOLDRAWTRANSFORMFEEDBACKINSTANCEDPROC dolDrawTransformFeedbackInstanced;
|
||||
PFNDOLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC dolDrawTransformFeedbackStreamInstanced;
|
||||
|
||||
// gl_4_3
|
||||
PFNDOLCLEARBUFFERDATAPROC dolClearBufferData;
|
||||
PFNDOLCLEARBUFFERSUBDATAPROC dolClearBufferSubData;
|
||||
PFNDOLDISPATCHCOMPUTEPROC dolDispatchCompute;
|
||||
PFNDOLDISPATCHCOMPUTEINDIRECTPROC dolDispatchComputeIndirect;
|
||||
PFNDOLFRAMEBUFFERPARAMETERIPROC dolFramebufferParameteri;
|
||||
PFNDOLGETFRAMEBUFFERPARAMETERIVPROC dolGetFramebufferParameteriv;
|
||||
PFNDOLGETINTERNALFORMATI64VPROC dolGetInternalformati64v;
|
||||
@ -905,6 +898,11 @@ PFNDOLTEXIMAGE3DMULTISAMPLEPROC dolTexImage3DMultisample;
|
||||
PFNDOLGETMULTISAMPLEFVPROC dolGetMultisamplefv;
|
||||
PFNDOLSAMPLEMASKIPROC dolSampleMaski;
|
||||
|
||||
// ARB_texture_storage
|
||||
PFNDOLTEXSTORAGE1DPROC dolTexStorage1D;
|
||||
PFNDOLTEXSTORAGE2DPROC dolTexStorage2D;
|
||||
PFNDOLTEXSTORAGE3DPROC dolTexStorage3D;
|
||||
|
||||
// ARB_texture_storage_multisample
|
||||
PFNDOLTEXSTORAGE2DMULTISAMPLEPROC dolTexStorage2DMultisample;
|
||||
PFNDOLTEXSTORAGE3DMULTISAMPLEPROC dolTexStorage3DMultisample;
|
||||
@ -989,6 +987,14 @@ PFNDOLDEPTHRANGEDNVPROC dolDepthRangedNV;
|
||||
PFNDOLCLEARDEPTHDNVPROC dolClearDepthdNV;
|
||||
PFNDOLDEPTHBOUNDSDNVPROC dolDepthBoundsdNV;
|
||||
|
||||
// ARB_shader_image_load_store
|
||||
PFNDOLBINDIMAGETEXTUREPROC dolBindImageTexture;
|
||||
PFNDOLMEMORYBARRIERPROC dolMemoryBarrier;
|
||||
|
||||
// ARB_compute_shader
|
||||
PFNDOLDISPATCHCOMPUTEPROC dolDispatchCompute;
|
||||
PFNDOLDISPATCHCOMPUTEINDIRECTPROC dolDispatchComputeIndirect;
|
||||
|
||||
// Creates a GLFunc object that requires a feature
|
||||
#define GLFUNC_REQUIRES(x, y) \
|
||||
{ \
|
||||
@ -1681,6 +1687,11 @@ const GLFunc gl_function_array[] = {
|
||||
GLFUNC_REQUIRES(glGetMultisamplefv, "GL_ARB_texture_multisample"),
|
||||
GLFUNC_REQUIRES(glSampleMaski, "GL_ARB_texture_multisample"),
|
||||
|
||||
// ARB_texture_storage
|
||||
GLFUNC_REQUIRES(glTexStorage1D, "GL_ARB_texture_storage !VERSION_4_2"),
|
||||
GLFUNC_REQUIRES(glTexStorage2D, "GL_ARB_texture_storage !VERSION_4_2 |VERSION_GLES_3"),
|
||||
GLFUNC_REQUIRES(glTexStorage3D, "GL_ARB_texture_storage !VERSION_4_2 |VERSION_GLES_3"),
|
||||
|
||||
// ARB_texture_storage_multisample
|
||||
GLFUNC_REQUIRES(glTexStorage2DMultisample,
|
||||
"GL_ARB_texture_storage_multisample !VERSION_4_3 |VERSION_GLES_3_1"),
|
||||
@ -1848,6 +1859,17 @@ const GLFunc gl_function_array[] = {
|
||||
GLFUNC_REQUIRES(glDepthRangedNV, "GL_NV_depth_buffer_float"),
|
||||
GLFUNC_REQUIRES(glClearDepthdNV, "GL_NV_depth_buffer_float"),
|
||||
GLFUNC_REQUIRES(glDepthBoundsdNV, "GL_NV_depth_buffer_float"),
|
||||
|
||||
// ARB_shader_image_load_store
|
||||
GLFUNC_REQUIRES(glBindImageTexture,
|
||||
"GL_ARB_shader_image_load_store !VERSION_4_2 |VERSION_GLES_3_1"),
|
||||
GLFUNC_REQUIRES(glMemoryBarrier,
|
||||
"GL_ARB_shader_image_load_store !VERSION_4_2 |VERSION_GLES_3_1"),
|
||||
|
||||
// ARB_compute_shader
|
||||
GLFUNC_REQUIRES(glDispatchCompute, "GL_ARB_compute_shader !VERSION_4_3 |VERSION_GLES_3_1"),
|
||||
GLFUNC_REQUIRES(glDispatchComputeIndirect,
|
||||
"GL_ARB_compute_shader !VERSION_4_3 |VERSION_GLES_3_1"),
|
||||
};
|
||||
|
||||
namespace GLExtensions
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "Common/GL/GLExtensions/ARB_blend_func_extended.h"
|
||||
#include "Common/GL/GLExtensions/ARB_buffer_storage.h"
|
||||
#include "Common/GL/GLExtensions/ARB_clip_control.h"
|
||||
#include "Common/GL/GLExtensions/ARB_compute_shader.h"
|
||||
#include "Common/GL/GLExtensions/ARB_copy_image.h"
|
||||
#include "Common/GL/GLExtensions/ARB_debug_output.h"
|
||||
#include "Common/GL/GLExtensions/ARB_draw_elements_base_vertex.h"
|
||||
@ -21,9 +22,11 @@
|
||||
#include "Common/GL/GLExtensions/ARB_occlusion_query2.h"
|
||||
#include "Common/GL/GLExtensions/ARB_sample_shading.h"
|
||||
#include "Common/GL/GLExtensions/ARB_sampler_objects.h"
|
||||
#include "Common/GL/GLExtensions/ARB_shader_image_load_store.h"
|
||||
#include "Common/GL/GLExtensions/ARB_shader_storage_buffer_object.h"
|
||||
#include "Common/GL/GLExtensions/ARB_sync.h"
|
||||
#include "Common/GL/GLExtensions/ARB_texture_multisample.h"
|
||||
#include "Common/GL/GLExtensions/ARB_texture_storage.h"
|
||||
#include "Common/GL/GLExtensions/ARB_texture_storage_multisample.h"
|
||||
#include "Common/GL/GLExtensions/ARB_uniform_buffer_object.h"
|
||||
#include "Common/GL/GLExtensions/ARB_vertex_array_object.h"
|
||||
|
@ -66,75 +66,10 @@
|
||||
#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9
|
||||
#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA
|
||||
#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
|
||||
#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002
|
||||
#define GL_UNIFORM_BARRIER_BIT 0x00000004
|
||||
#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008
|
||||
#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
|
||||
#define GL_COMMAND_BARRIER_BIT 0x00000040
|
||||
#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080
|
||||
#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100
|
||||
#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200
|
||||
#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400
|
||||
#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
|
||||
#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000
|
||||
#define GL_ALL_BARRIER_BITS 0xFFFFFFFF
|
||||
#define GL_MAX_IMAGE_UNITS 0x8F38
|
||||
#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39
|
||||
#define GL_IMAGE_BINDING_NAME 0x8F3A
|
||||
#define GL_IMAGE_BINDING_LEVEL 0x8F3B
|
||||
#define GL_IMAGE_BINDING_LAYERED 0x8F3C
|
||||
#define GL_IMAGE_BINDING_LAYER 0x8F3D
|
||||
#define GL_IMAGE_BINDING_ACCESS 0x8F3E
|
||||
#define GL_IMAGE_1D 0x904C
|
||||
#define GL_IMAGE_2D 0x904D
|
||||
#define GL_IMAGE_3D 0x904E
|
||||
#define GL_IMAGE_2D_RECT 0x904F
|
||||
#define GL_IMAGE_CUBE 0x9050
|
||||
#define GL_IMAGE_BUFFER 0x9051
|
||||
#define GL_IMAGE_1D_ARRAY 0x9052
|
||||
#define GL_IMAGE_2D_ARRAY 0x9053
|
||||
#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054
|
||||
#define GL_IMAGE_2D_MULTISAMPLE 0x9055
|
||||
#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056
|
||||
#define GL_INT_IMAGE_1D 0x9057
|
||||
#define GL_INT_IMAGE_2D 0x9058
|
||||
#define GL_INT_IMAGE_3D 0x9059
|
||||
#define GL_INT_IMAGE_2D_RECT 0x905A
|
||||
#define GL_INT_IMAGE_CUBE 0x905B
|
||||
#define GL_INT_IMAGE_BUFFER 0x905C
|
||||
#define GL_INT_IMAGE_1D_ARRAY 0x905D
|
||||
#define GL_INT_IMAGE_2D_ARRAY 0x905E
|
||||
#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F
|
||||
#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060
|
||||
#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061
|
||||
#define GL_UNSIGNED_INT_IMAGE_1D 0x9062
|
||||
#define GL_UNSIGNED_INT_IMAGE_2D 0x9063
|
||||
#define GL_UNSIGNED_INT_IMAGE_3D 0x9064
|
||||
#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065
|
||||
#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
|
||||
#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067
|
||||
#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068
|
||||
#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
|
||||
#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
|
||||
#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B
|
||||
#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C
|
||||
#define GL_MAX_IMAGE_SAMPLES 0x906D
|
||||
#define GL_IMAGE_BINDING_FORMAT 0x906E
|
||||
#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
|
||||
#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
|
||||
#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
|
||||
#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
|
||||
#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB
|
||||
#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC
|
||||
#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
|
||||
#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
|
||||
#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
|
||||
#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D
|
||||
#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E
|
||||
#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
|
||||
#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
|
||||
|
||||
typedef void(APIENTRYP PFNDOLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)(GLenum mode, GLint first,
|
||||
GLsizei count,
|
||||
@ -152,16 +87,6 @@ typedef void(APIENTRYP PFNDOLGETINTERNALFORMATIVPROC)(GLenum target, GLenum inte
|
||||
GLenum pname, GLsizei bufSize, GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLGETACTIVEATOMICCOUNTERBUFFERIVPROC)(GLuint program, GLuint bufferIndex,
|
||||
GLenum pname, GLint* params);
|
||||
typedef void(APIENTRYP PFNDOLBINDIMAGETEXTUREPROC)(GLuint unit, GLuint texture, GLint level,
|
||||
GLboolean layered, GLint layer, GLenum access,
|
||||
GLenum format);
|
||||
typedef void(APIENTRYP PFNDOLMEMORYBARRIERPROC)(GLbitfield barriers);
|
||||
typedef void(APIENTRYP PFNDOLTEXSTORAGE1DPROC)(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
GLsizei width);
|
||||
typedef void(APIENTRYP PFNDOLTEXSTORAGE2DPROC)(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
GLsizei width, GLsizei height);
|
||||
typedef void(APIENTRYP PFNDOLTEXSTORAGE3DPROC)(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
GLsizei width, GLsizei height, GLsizei depth);
|
||||
typedef void(APIENTRYP PFNDOLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)(GLenum mode, GLuint id,
|
||||
GLsizei instancecount);
|
||||
typedef void(APIENTRYP PFNDOLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)(GLenum mode, GLuint id,
|
||||
@ -174,11 +99,6 @@ extern PFNDOLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC
|
||||
dolDrawElementsInstancedBaseVertexBaseInstance;
|
||||
extern PFNDOLGETINTERNALFORMATIVPROC dolGetInternalformativ;
|
||||
extern PFNDOLGETACTIVEATOMICCOUNTERBUFFERIVPROC dolGetActiveAtomicCounterBufferiv;
|
||||
extern PFNDOLBINDIMAGETEXTUREPROC dolBindImageTexture;
|
||||
extern PFNDOLMEMORYBARRIERPROC dolMemoryBarrier;
|
||||
extern PFNDOLTEXSTORAGE1DPROC dolTexStorage1D;
|
||||
extern PFNDOLTEXSTORAGE2DPROC dolTexStorage2D;
|
||||
extern PFNDOLTEXSTORAGE3DPROC dolTexStorage3D;
|
||||
extern PFNDOLDRAWTRANSFORMFEEDBACKINSTANCEDPROC dolDrawTransformFeedbackInstanced;
|
||||
extern PFNDOLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC dolDrawTransformFeedbackStreamInstanced;
|
||||
|
||||
@ -187,10 +107,5 @@ extern PFNDOLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC dolDrawTransformFeedbackSt
|
||||
#define glDrawElementsInstancedBaseVertexBaseInstance dolDrawElementsInstancedBaseVertexBaseInstance
|
||||
#define glGetInternalformativ dolGetInternalformativ
|
||||
#define glGetActiveAtomicCounterBufferiv dolGetActiveAtomicCounterBufferiv
|
||||
#define glBindImageTexture dolBindImageTexture
|
||||
#define glMemoryBarrier dolMemoryBarrier
|
||||
#define glTexStorage1D dolTexStorage1D
|
||||
#define glTexStorage2D dolTexStorage2D
|
||||
#define glTexStorage3D dolTexStorage3D
|
||||
#define glDrawTransformFeedbackInstanced dolDrawTransformFeedbackInstanced
|
||||
#define glDrawTransformFeedbackStreamInstanced dolDrawTransformFeedbackStreamInstanced
|
||||
|
@ -38,24 +38,6 @@
|
||||
#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69
|
||||
#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
|
||||
#define GL_MAX_ELEMENT_INDEX 0x8D6B
|
||||
#define GL_COMPUTE_SHADER 0x91B9
|
||||
#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB
|
||||
#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC
|
||||
#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD
|
||||
#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262
|
||||
#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263
|
||||
#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264
|
||||
#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265
|
||||
#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266
|
||||
#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB
|
||||
#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE
|
||||
#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF
|
||||
#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267
|
||||
#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC
|
||||
#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED
|
||||
#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE
|
||||
#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
|
||||
#define GL_COMPUTE_SHADER_BIT 0x00000020
|
||||
#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
|
||||
#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
|
||||
#define GL_DEBUG_CALLBACK_FUNCTION 0x8244
|
||||
@ -287,9 +269,6 @@ typedef void(APIENTRYP PFNDOLCLEARBUFFERDATAPROC)(GLenum target, GLenum internal
|
||||
typedef void(APIENTRYP PFNDOLCLEARBUFFERSUBDATAPROC)(GLenum target, GLenum internalformat,
|
||||
GLintptr offset, GLsizeiptr size,
|
||||
GLenum format, GLenum type, const void* data);
|
||||
typedef void(APIENTRYP PFNDOLDISPATCHCOMPUTEPROC)(GLuint num_groups_x, GLuint num_groups_y,
|
||||
GLuint num_groups_z);
|
||||
typedef void(APIENTRYP PFNDOLDISPATCHCOMPUTEINDIRECTPROC)(GLintptr indirect);
|
||||
typedef void(APIENTRYP PFNDOLFRAMEBUFFERPARAMETERIPROC)(GLenum target, GLenum pname, GLint param);
|
||||
typedef void(APIENTRYP PFNDOLGETFRAMEBUFFERPARAMETERIVPROC)(GLenum target, GLenum pname,
|
||||
GLint* params);
|
||||
@ -348,8 +327,6 @@ typedef void(APIENTRYP PFNDOLVERTEXBINDINGDIVISORPROC)(GLuint bindingindex, GLui
|
||||
|
||||
extern PFNDOLCLEARBUFFERDATAPROC dolClearBufferData;
|
||||
extern PFNDOLCLEARBUFFERSUBDATAPROC dolClearBufferSubData;
|
||||
extern PFNDOLDISPATCHCOMPUTEPROC dolDispatchCompute;
|
||||
extern PFNDOLDISPATCHCOMPUTEINDIRECTPROC dolDispatchComputeIndirect;
|
||||
extern PFNDOLFRAMEBUFFERPARAMETERIPROC dolFramebufferParameteri;
|
||||
extern PFNDOLGETFRAMEBUFFERPARAMETERIVPROC dolGetFramebufferParameteriv;
|
||||
extern PFNDOLGETINTERNALFORMATI64VPROC dolGetInternalformati64v;
|
||||
@ -378,8 +355,6 @@ extern PFNDOLVERTEXBINDINGDIVISORPROC dolVertexBindingDivisor;
|
||||
|
||||
#define glClearBufferData dolClearBufferData
|
||||
#define glClearBufferSubData dolClearBufferSubData
|
||||
#define glDispatchCompute dolDispatchCompute
|
||||
#define glDispatchComputeIndirect dolDispatchComputeIndirect
|
||||
#define glFramebufferParameteri dolFramebufferParameteri
|
||||
#define glGetFramebufferParameteriv dolGetFramebufferParameteriv
|
||||
#define glGetInternalformati64v dolGetInternalformati64v
|
||||
|
Reference in New Issue
Block a user