summaryrefslogtreecommitdiffstats
path: root/src/render/graphicshelpers
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/graphicshelpers')
-rw-r--r--src/render/graphicshelpers/graphicscontext.cpp4
-rw-r--r--src/render/graphicshelpers/graphicshelperes2.cpp8
-rw-r--r--src/render/graphicshelpers/graphicshelperes2_p.h1
-rw-r--r--src/render/graphicshelpers/graphicshelpergl2.cpp7
-rw-r--r--src/render/graphicshelpers/graphicshelpergl2_p.h1
-rw-r--r--src/render/graphicshelpers/graphicshelpergl3.cpp27
-rw-r--r--src/render/graphicshelpers/graphicshelpergl3_3.cpp27
-rw-r--r--src/render/graphicshelpers/graphicshelpergl3_3_p.h1
-rw-r--r--src/render/graphicshelpers/graphicshelpergl3_p.h1
-rw-r--r--src/render/graphicshelpers/graphicshelpergl4.cpp94
-rw-r--r--src/render/graphicshelpers/graphicshelpergl4_p.h1
-rw-r--r--src/render/graphicshelpers/graphicshelperinterface_p.h4
12 files changed, 148 insertions, 28 deletions
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp
index e94611010..8dc27f80a 100644
--- a/src/render/graphicshelpers/graphicscontext.cpp
+++ b/src/render/graphicshelpers/graphicscontext.cpp
@@ -348,6 +348,8 @@ void GraphicsContext::activateShader(Shader *shader)
shader->initializeAttributes(m_glHelper->programAttributesAndLocations(prog->programId()));
if (m_glHelper->supportsFeature(GraphicsHelperInterface::UniformBufferObject))
shader->initializeUniformBlocks(m_glHelper->programUniformBlocks(prog->programId()));
+ if (m_glHelper->supportsFeature(GraphicsHelperInterface::ShaderStorageObject))
+ shader->initializeShaderStorageBlocks(m_glHelper->programShaderStorageBlocks(prog->programId()));
m_activeShader = Q_NULLPTR;
} else if (!shader->isLoaded()) {
// Shader program is already in the m_shaderHash but we still need to
@@ -911,7 +913,7 @@ void GraphicsContext::setUniforms(QUniformPack &uniforms)
if (!ubo->isBound())
ubo->bind(this);
needsToUnbindUBO |= true;
- const QHash<QString, ShaderUniform> &activeUniformsInBlock = m_activeShader->activeUniformsForBlock(block.m_index);
+ const QHash<QString, ShaderUniform> &activeUniformsInBlock = m_activeShader->activeUniformsForUniformBlock(block.m_index);
const QHash<QString, ShaderUniform>::const_iterator uniformsEnd = activeUniformsInBlock.end();
QHash<QString, ShaderUniform>::const_iterator uniformsIt = activeUniformsInBlock.begin();
diff --git a/src/render/graphicshelpers/graphicshelperes2.cpp b/src/render/graphicshelpers/graphicshelperes2.cpp
index 86e526d61..1e1e1710a 100644
--- a/src/render/graphicshelpers/graphicshelperes2.cpp
+++ b/src/render/graphicshelpers/graphicshelperes2.cpp
@@ -208,6 +208,14 @@ QVector<ShaderUniformBlock> GraphicsHelperES2::programUniformBlocks(GLuint progr
return blocks;
}
+QVector<ShaderStorageBlock> GraphicsHelperES2::programShaderStorageBlocks(GLuint programId)
+{
+ Q_UNUSED(programId);
+ QVector<ShaderStorageBlock> blocks;
+ qWarning() << "SSBO are not supported by OpenGL ES 2.0 (since OpenGL ES 3.1)";
+ return blocks;
+}
+
void GraphicsHelperES2::vertexAttribDivisor(GLuint index, GLuint divisor)
{
Q_UNUSED(index);
diff --git a/src/render/graphicshelpers/graphicshelperes2_p.h b/src/render/graphicshelpers/graphicshelperes2_p.h
index 5d75137e9..5211bb3ac 100644
--- a/src/render/graphicshelpers/graphicshelperes2_p.h
+++ b/src/render/graphicshelpers/graphicshelperes2_p.h
@@ -100,6 +100,7 @@ public:
QVector<ShaderUniformBlock> programUniformBlocks(GLuint programId) Q_DECL_OVERRIDE;
QVector<ShaderAttribute> programAttributesAndLocations(GLuint programId) Q_DECL_OVERRIDE;
QVector<ShaderUniform> programUniformsAndLocations(GLuint programId) Q_DECL_OVERRIDE;
+ QVector<ShaderStorageBlock> programShaderStorageBlocks(GLuint programId) Q_DECL_OVERRIDE;
void releaseFrameBufferObject(GLuint frameBufferId) Q_DECL_OVERRIDE;
void setVerticesPerPatch(GLint verticesPerPatch) Q_DECL_OVERRIDE;
bool supportsFeature(Feature feature) const Q_DECL_OVERRIDE;
diff --git a/src/render/graphicshelpers/graphicshelpergl2.cpp b/src/render/graphicshelpers/graphicshelpergl2.cpp
index a73833b28..28283928a 100644
--- a/src/render/graphicshelpers/graphicshelpergl2.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl2.cpp
@@ -190,6 +190,13 @@ QVector<ShaderUniformBlock> GraphicsHelperGL2::programUniformBlocks(GLuint progr
return blocks;
}
+QVector<ShaderStorageBlock> GraphicsHelperGL2::programShaderStorageBlocks(GLuint programId)
+{
+ Q_UNUSED(programId);
+ qWarning() << "SSBO are not supported by OpenGL 2.0 (since OpenGL 4.3)";
+ return QVector<ShaderStorageBlock>();
+}
+
void GraphicsHelperGL2::vertexAttribDivisor(GLuint index,
GLuint divisor)
{
diff --git a/src/render/graphicshelpers/graphicshelpergl2_p.h b/src/render/graphicshelpers/graphicshelpergl2_p.h
index 62016c9e8..0ad6a39d8 100644
--- a/src/render/graphicshelpers/graphicshelpergl2_p.h
+++ b/src/render/graphicshelpers/graphicshelpergl2_p.h
@@ -102,6 +102,7 @@ public:
QVector<ShaderUniformBlock> programUniformBlocks(GLuint programId) Q_DECL_OVERRIDE;
QVector<ShaderAttribute> programAttributesAndLocations(GLuint programId) Q_DECL_OVERRIDE;
QVector<ShaderUniform> programUniformsAndLocations(GLuint programId) Q_DECL_OVERRIDE;
+ QVector<ShaderStorageBlock> programShaderStorageBlocks(GLuint programId) Q_DECL_OVERRIDE;
void releaseFrameBufferObject(GLuint frameBufferId) Q_DECL_OVERRIDE;
void setVerticesPerPatch(GLint verticesPerPatch) Q_DECL_OVERRIDE;
bool supportsFeature(Feature feature) const Q_DECL_OVERRIDE;
diff --git a/src/render/graphicshelpers/graphicshelpergl3.cpp b/src/render/graphicshelpers/graphicshelpergl3.cpp
index 181093cbc..91339da74 100644
--- a/src/render/graphicshelpers/graphicshelpergl3.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl3.cpp
@@ -46,6 +46,25 @@
QT_BEGIN_NAMESPACE
+# ifndef QT_OPENGL_3
+# define GL_PATCH_VERTICES 36466
+# define GL_ACTIVE_RESOURCES 0x92F5
+# define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
+# define GL_BUFFER_BINDING 0x9302
+# define GL_BUFFER_DATA_SIZE 0x9303
+# define GL_NUM_ACTIVE_VARIABLES 0x9304
+# define GL_SHADER_STORAGE_BLOCK 0x92E6
+# define GL_UNIFORM 0x92E1
+# define GL_UNIFORM_BLOCK 0x92E2
+# define GL_UNIFORM_BLOCK_INDEX 0x8A3A
+# define GL_UNIFORM_OFFSET 0x8A3B
+# define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
+# define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
+# define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
+# define GL_UNIFORM_BLOCK_BINDING 0x8A3F
+# define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
+# endif
+
namespace Qt3DRender {
namespace Render {
@@ -218,6 +237,14 @@ QVector<ShaderUniformBlock> GraphicsHelperGL3::programUniformBlocks(GLuint progr
return blocks;
}
+QVector<ShaderStorageBlock> GraphicsHelperGL3::programShaderStorageBlocks(GLuint programId)
+{
+ Q_UNUSED(programId);
+ QVector<ShaderStorageBlock> blocks;
+ qWarning() << "SSBO are not supported by OpenGL 3.2 (since OpenGL 4.3)";
+ return blocks;
+}
+
void GraphicsHelperGL3::vertexAttribDivisor(GLuint index, GLuint divisor)
{
Q_UNUSED(index);
diff --git a/src/render/graphicshelpers/graphicshelpergl3_3.cpp b/src/render/graphicshelpers/graphicshelpergl3_3.cpp
index e5e7c23e1..4e916755a 100644
--- a/src/render/graphicshelpers/graphicshelpergl3_3.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl3_3.cpp
@@ -43,6 +43,25 @@
#include <private/attachmentpack_p.h>
#include <private/qgraphicsutils_p.h>
+# ifndef QT_OPENGL_3_2
+# define GL_PATCH_VERTICES 36466
+# define GL_ACTIVE_RESOURCES 0x92F5
+# define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
+# define GL_BUFFER_BINDING 0x9302
+# define GL_BUFFER_DATA_SIZE 0x9303
+# define GL_NUM_ACTIVE_VARIABLES 0x9304
+# define GL_SHADER_STORAGE_BLOCK 0x92E6
+# define GL_UNIFORM 0x92E1
+# define GL_UNIFORM_BLOCK 0x92E2
+# define GL_UNIFORM_BLOCK_INDEX 0x8A3A
+# define GL_UNIFORM_OFFSET 0x8A3B
+# define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
+# define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
+# define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
+# define GL_UNIFORM_BLOCK_BINDING 0x8A3F
+# define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
+# endif
+
QT_BEGIN_NAMESPACE
namespace Qt3DRender {
@@ -217,6 +236,14 @@ QVector<ShaderUniformBlock> GraphicsHelperGL3_3::programUniformBlocks(GLuint pro
return blocks;
}
+QVector<ShaderStorageBlock> GraphicsHelperGL3_3::programShaderStorageBlocks(GLuint programId)
+{
+ Q_UNUSED(programId);
+ QVector<ShaderStorageBlock> blocks;
+ qWarning() << "SSBO are not supported by OpenGL 3.3 (since OpenGL 4.3)";
+ return blocks;
+}
+
void GraphicsHelperGL3_3::vertexAttribDivisor(GLuint index, GLuint divisor)
{
m_funcs->glVertexAttribDivisor(index, divisor);
diff --git a/src/render/graphicshelpers/graphicshelpergl3_3_p.h b/src/render/graphicshelpers/graphicshelpergl3_3_p.h
index 625720d06..bce7efdd7 100644
--- a/src/render/graphicshelpers/graphicshelpergl3_3_p.h
+++ b/src/render/graphicshelpers/graphicshelpergl3_3_p.h
@@ -103,6 +103,7 @@ public:
QVector<ShaderUniformBlock> programUniformBlocks(GLuint programId) Q_DECL_OVERRIDE;
QVector<ShaderAttribute> programAttributesAndLocations(GLuint programId) Q_DECL_OVERRIDE;
QVector<ShaderUniform> programUniformsAndLocations(GLuint programId) Q_DECL_OVERRIDE;
+ QVector<ShaderStorageBlock> programShaderStorageBlocks(GLuint programId) Q_DECL_OVERRIDE;
void releaseFrameBufferObject(GLuint frameBufferId) Q_DECL_OVERRIDE;
void setVerticesPerPatch(GLint verticesPerPatch) Q_DECL_OVERRIDE;
bool supportsFeature(Feature feature) const Q_DECL_OVERRIDE;
diff --git a/src/render/graphicshelpers/graphicshelpergl3_p.h b/src/render/graphicshelpers/graphicshelpergl3_p.h
index 59337a690..56bce6f07 100644
--- a/src/render/graphicshelpers/graphicshelpergl3_p.h
+++ b/src/render/graphicshelpers/graphicshelpergl3_p.h
@@ -103,6 +103,7 @@ public:
QVector<ShaderUniformBlock> programUniformBlocks(GLuint programId) Q_DECL_OVERRIDE;
QVector<ShaderAttribute> programAttributesAndLocations(GLuint programId) Q_DECL_OVERRIDE;
QVector<ShaderUniform> programUniformsAndLocations(GLuint programId) Q_DECL_OVERRIDE;
+ QVector<ShaderStorageBlock> programShaderStorageBlocks(GLuint programId) Q_DECL_OVERRIDE;
void releaseFrameBufferObject(GLuint frameBufferId) Q_DECL_OVERRIDE;
void setVerticesPerPatch(GLint verticesPerPatch) Q_DECL_OVERRIDE;
bool supportsFeature(Feature feature) const Q_DECL_OVERRIDE;
diff --git a/src/render/graphicshelpers/graphicshelpergl4.cpp b/src/render/graphicshelpers/graphicshelpergl4.cpp
index 74f7b4d4f..df9a2f839 100644
--- a/src/render/graphicshelpers/graphicshelpergl4.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl4.cpp
@@ -43,8 +43,22 @@
#include <private/attachmentpack_p.h>
#include <private/qgraphicsutils_p.h>
-# ifndef QT_OPENGL_4
+# ifndef QT_OPENGL_4_3
# define GL_PATCH_VERTICES 36466
+# define GL_ACTIVE_RESOURCES 0x92F5
+# define GL_BUFFER_BINDING 0x9302
+# define GL_BUFFER_DATA_SIZE 0x9303
+# define GL_NUM_ACTIVE_VARIABLES 0x9304
+# define GL_SHADER_STORAGE_BLOCK 0x92E6
+# define GL_UNIFORM 0x92E1
+# define GL_UNIFORM_BLOCK 0x92E2
+# define GL_UNIFORM_BLOCK_INDEX 0x8A3A
+# define GL_UNIFORM_OFFSET 0x8A3B
+# define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
+# define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
+# define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
+# define GL_UNIFORM_BLOCK_BINDING 0x8A3F
+# define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
# endif
QT_BEGIN_NAMESPACE
@@ -58,7 +72,7 @@ GraphicsHelperGL4::GraphicsHelperGL4()
}
void GraphicsHelperGL4::initializeHelper(QOpenGLContext *context,
- QAbstractOpenGLFunctions *functions)
+ QAbstractOpenGLFunctions *functions)
{
Q_UNUSED(context);
m_funcs = static_cast<QOpenGLFunctions_4_3_Core*>(functions);
@@ -68,12 +82,12 @@ void GraphicsHelperGL4::initializeHelper(QOpenGLContext *context,
}
void GraphicsHelperGL4::drawElementsInstanced(GLenum primitiveType,
- GLsizei primitiveCount,
- GLint indexType,
- void *indices,
- GLsizei instances,
- GLint baseVertex,
- GLint baseInstance)
+ GLsizei primitiveCount,
+ GLint indexType,
+ void *indices,
+ GLsizei instances,
+ GLint baseVertex,
+ GLint baseInstance)
{
if (baseInstance != 0)
qWarning() << "glDrawElementsInstancedBaseVertexBaseInstance is not supported with OpenGL ES 2";
@@ -88,9 +102,9 @@ void GraphicsHelperGL4::drawElementsInstanced(GLenum primitiveType,
}
void GraphicsHelperGL4::drawArraysInstanced(GLenum primitiveType,
- GLint first,
- GLsizei count,
- GLsizei instances)
+ GLint first,
+ GLsizei count,
+ GLsizei instances)
{
// glDrawArraysInstanced OpenGL 3.1 or greater
m_funcs->glDrawArraysInstanced(primitiveType,
@@ -100,10 +114,10 @@ void GraphicsHelperGL4::drawArraysInstanced(GLenum primitiveType,
}
void GraphicsHelperGL4::drawElements(GLenum primitiveType,
- GLsizei primitiveCount,
- GLint indexType,
- void *indices,
- GLint baseVertex)
+ GLsizei primitiveCount,
+ GLint indexType,
+ void *indices,
+ GLint baseVertex)
{
m_funcs->glDrawElementsBaseVertex(primitiveType,
primitiveCount,
@@ -113,8 +127,8 @@ void GraphicsHelperGL4::drawElements(GLenum primitiveType,
}
void GraphicsHelperGL4::drawArrays(GLenum primitiveType,
- GLint first,
- GLsizei count)
+ GLint first,
+ GLsizei count)
{
m_funcs->glDrawArrays(primitiveType,
first,
@@ -136,10 +150,10 @@ QVector<ShaderUniform> GraphicsHelperGL4::programUniformsAndLocations(GLuint pro
QVector<ShaderUniform> uniforms;
GLint nbrActiveUniforms = 0;
- m_funcs->glGetProgramiv(programId, GL_ACTIVE_UNIFORMS, &nbrActiveUniforms);
+ m_funcs->glGetProgramInterfaceiv(programId, GL_UNIFORM, GL_ACTIVE_RESOURCES, &nbrActiveUniforms);
uniforms.reserve(nbrActiveUniforms);
char uniformName[256];
- for (GLint i = 0; i < nbrActiveUniforms; i++) {
+ for (GLint i = 0; i < nbrActiveUniforms; ++i) {
ShaderUniform uniform;
GLsizei uniformNameLength = 0;
// Size is 1 for scalar and more for struct or arrays
@@ -170,7 +184,7 @@ QVector<ShaderAttribute> GraphicsHelperGL4::programAttributesAndLocations(GLuint
m_funcs->glGetProgramiv(programId, GL_ACTIVE_ATTRIBUTES, &nbrActiveAttributes);
attributes.reserve(nbrActiveAttributes);
char attributeName[256];
- for (GLint i = 0; i < nbrActiveAttributes; i++) {
+ for (GLint i = 0; i < nbrActiveAttributes; ++i) {
ShaderAttribute attribute;
GLsizei attributeNameLength = 0;
// Size is 1 for scalar and more for struct or arrays
@@ -189,23 +203,50 @@ QVector<ShaderUniformBlock> GraphicsHelperGL4::programUniformBlocks(GLuint progr
{
QVector<ShaderUniformBlock> blocks;
GLint nbrActiveUniformsBlocks = 0;
- m_funcs->glGetProgramiv(programId, GL_ACTIVE_UNIFORM_BLOCKS, &nbrActiveUniformsBlocks);
+ m_funcs->glGetProgramInterfaceiv(programId, GL_UNIFORM_BLOCK, GL_ACTIVE_RESOURCES, &nbrActiveUniformsBlocks);
blocks.reserve(nbrActiveUniformsBlocks);
- for (GLint i = 0; i < nbrActiveUniformsBlocks; i++) {
+ for (GLint i = 0; i < nbrActiveUniformsBlocks; ++i) {
QByteArray uniformBlockName(256, '\0');
GLsizei length = 0;
ShaderUniformBlock uniformBlock;
- m_funcs->glGetActiveUniformBlockName(programId, i, 256, &length, uniformBlockName.data());
+ m_funcs->glGetProgramResourceName(programId, GL_UNIFORM_BLOCK, i, 256, &length, uniformBlockName.data());
uniformBlock.m_name = QString::fromUtf8(uniformBlockName.left(length));
uniformBlock.m_index = i;
- m_funcs->glGetActiveUniformBlockiv(programId, i, GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS, &uniformBlock.m_activeUniformsCount);
- m_funcs->glGetActiveUniformBlockiv(programId, i, GL_UNIFORM_BLOCK_BINDING, &uniformBlock.m_binding);
- m_funcs->glGetActiveUniformBlockiv(programId, i, GL_UNIFORM_BLOCK_DATA_SIZE, &uniformBlock.m_size);
+ GLenum prop = GL_BUFFER_BINDING;
+ m_funcs->glGetProgramResourceiv(programId, GL_UNIFORM_BLOCK, i, 1, &prop, 4, NULL, &uniformBlock.m_binding);
+ prop = GL_BUFFER_DATA_SIZE;
+ m_funcs->glGetProgramResourceiv(programId, GL_UNIFORM_BLOCK, i, 1, &prop, 4, NULL, &uniformBlock.m_size);
+ prop = GL_NUM_ACTIVE_VARIABLES;
+ m_funcs->glGetProgramResourceiv(programId, GL_UNIFORM_BLOCK, i, 1, &prop, 4, NULL, &uniformBlock.m_activeUniformsCount);
blocks.append(uniformBlock);
}
return blocks;
}
+QVector<ShaderStorageBlock> GraphicsHelperGL4::programShaderStorageBlocks(GLuint programId)
+{
+ QVector<ShaderStorageBlock> blocks;
+ GLint nbrActiveShaderStorageBlocks = 0;
+ m_funcs->glGetProgramInterfaceiv(programId, GL_SHADER_STORAGE_BLOCK, GL_ACTIVE_RESOURCES, &nbrActiveShaderStorageBlocks);
+ blocks.reserve(nbrActiveShaderStorageBlocks);
+ for (GLint i = 0; i < nbrActiveShaderStorageBlocks; ++i) {
+ QByteArray storageBlockName(256, '\0');
+ GLsizei length = 0;
+ ShaderStorageBlock storageBlock;
+ m_funcs->glGetProgramResourceName(programId, GL_SHADER_STORAGE_BLOCK, i, 256, &length, storageBlockName.data());
+ storageBlock.m_index = i;
+ storageBlock.m_name = QString::fromUtf8(storageBlockName.left(length));
+ GLenum prop = GL_BUFFER_BINDING;
+ m_funcs->glGetProgramResourceiv(programId, GL_SHADER_STORAGE_BLOCK, i, 1, &prop, 4, NULL, &storageBlock.m_binding);
+ prop = GL_BUFFER_DATA_SIZE;
+ m_funcs->glGetProgramResourceiv(programId, GL_SHADER_STORAGE_BLOCK, i, 1, &prop, 4, NULL, &storageBlock.m_size);
+ prop = GL_NUM_ACTIVE_VARIABLES;
+ m_funcs->glGetProgramResourceiv(programId, GL_SHADER_STORAGE_BLOCK, i, 1, &prop, 4, NULL, &storageBlock.m_activeVariablesCount);
+ blocks.push_back(storageBlock);
+ }
+ return blocks;
+}
+
void GraphicsHelperGL4::vertexAttribDivisor(GLuint index, GLuint divisor)
{
m_funcs->glVertexAttribDivisor(index, divisor);
@@ -321,6 +362,7 @@ bool GraphicsHelperGL4::supportsFeature(GraphicsHelperInterface::Feature feature
case UniformBufferObject:
case RenderBufferDimensionRetrieval:
case TextureDimensionRetrieval:
+ case ShaderStorageObject:
return true;
default:
return false;
diff --git a/src/render/graphicshelpers/graphicshelpergl4_p.h b/src/render/graphicshelpers/graphicshelpergl4_p.h
index 0ed007482..aaf840d10 100644
--- a/src/render/graphicshelpers/graphicshelpergl4_p.h
+++ b/src/render/graphicshelpers/graphicshelpergl4_p.h
@@ -102,6 +102,7 @@ public:
QVector<ShaderUniformBlock> programUniformBlocks(GLuint programId) Q_DECL_OVERRIDE;
QVector<ShaderAttribute> programAttributesAndLocations(GLuint programId) Q_DECL_OVERRIDE;
QVector<ShaderUniform> programUniformsAndLocations(GLuint programId) Q_DECL_OVERRIDE;
+ QVector<ShaderStorageBlock> programShaderStorageBlocks(GLuint programId) Q_DECL_OVERRIDE;
void releaseFrameBufferObject(GLuint frameBufferId) Q_DECL_OVERRIDE;
void setVerticesPerPatch(GLint verticesPerPatch) Q_DECL_OVERRIDE;
bool supportsFeature(Feature feature) const Q_DECL_OVERRIDE;
diff --git a/src/render/graphicshelpers/graphicshelperinterface_p.h b/src/render/graphicshelpers/graphicshelperinterface_p.h
index 15c950253..95264dc49 100644
--- a/src/render/graphicshelpers/graphicshelperinterface_p.h
+++ b/src/render/graphicshelpers/graphicshelperinterface_p.h
@@ -70,7 +70,8 @@ public:
BindableFragmentOutputs,
PrimitiveRestart,
RenderBufferDimensionRetrieval,
- TextureDimensionRetrieval
+ TextureDimensionRetrieval,
+ ShaderStorageObject
};
virtual ~GraphicsHelperInterface() {}
@@ -110,6 +111,7 @@ public:
virtual QVector<ShaderAttribute> programAttributesAndLocations(GLuint programId) = 0;
virtual QVector<ShaderUniform> programUniformsAndLocations(GLuint programId) = 0;
virtual QVector<ShaderUniformBlock> programUniformBlocks(GLuint programId) = 0;
+ virtual QVector<ShaderStorageBlock> programShaderStorageBlocks(GLuint programId) = 0;
virtual void releaseFrameBufferObject(GLuint frameBufferId) = 0;
virtual void setVerticesPerPatch(GLint verticesPerPatch) = 0;
virtual bool supportsFeature(Feature feature) const = 0;