Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qrhigles2.cpp File Reference

(690bb2e0c471e43d408f79c8e23126e2113da938)

#include "qrhigles2_p.h"
#include <QOffscreenSurface>
#include <QOpenGLContext>
#include <QtCore/qmap.h>
#include <QtGui/private/qopenglextensions_p.h>
#include <QtGui/private/qopenglprogrambinarycache_p.h>
#include <QtGui/private/qwindow_p.h>
#include <qpa/qplatformopenglcontext.h>
#include <qmath.h>
+ Include dependency graph for qrhigles2.cpp:

Go to the source code of this file.

Classes

struct  QGles2PipelineCacheDataHeader
 
struct  CommandBufferExecTrackedState
 

Macros

#define GL_BGRA   0x80E1
 \variable QRhiGles2NativeHandles::context
 
#define GL_R8   0x8229
 
#define GL_RG8   0x822B
 
#define GL_RG   0x8227
 
#define GL_R16   0x822A
 
#define GL_RG16   0x822C
 
#define GL_RED   0x1903
 
#define GL_RGBA8   0x8058
 
#define GL_RGBA32F   0x8814
 
#define GL_RGBA16F   0x881A
 
#define GL_R16F   0x822D
 
#define GL_R32F   0x822E
 
#define GL_HALF_FLOAT   0x140B
 
#define GL_DEPTH_COMPONENT16   0x81A5
 
#define GL_DEPTH_COMPONENT24   0x81A6
 
#define GL_DEPTH_COMPONENT32F   0x8CAC
 
#define GL_UNSIGNED_INT_24_8   0x84FA
 
#define GL_STENCIL_INDEX   0x1901
 
#define GL_STENCIL_INDEX8   0x8D48
 
#define GL_DEPTH24_STENCIL8   0x88F0
 
#define GL_DEPTH_STENCIL_ATTACHMENT   0x821A
 
#define GL_DEPTH_STENCIL   0x84F9
 
#define GL_PRIMITIVE_RESTART_FIXED_INDEX   0x8D69
 
#define GL_FRAMEBUFFER_SRGB   0x8DB9
 
#define GL_READ_FRAMEBUFFER   0x8CA8
 
#define GL_DRAW_FRAMEBUFFER   0x8CA9
 
#define GL_MAX_DRAW_BUFFERS   0x8824
 
#define GL_TEXTURE_COMPARE_MODE   0x884C
 
#define GL_COMPARE_REF_TO_TEXTURE   0x884E
 
#define GL_TEXTURE_COMPARE_FUNC   0x884D
 
#define GL_MAX_SAMPLES   0x8D57
 
#define GL_SHADER_STORAGE_BUFFER   0x90D2
 
#define GL_READ_ONLY   0x88B8
 
#define GL_WRITE_ONLY   0x88B9
 
#define GL_READ_WRITE   0x88BA
 
#define GL_COMPUTE_SHADER   0x91B9
 
#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT   0x00000001
 
#define GL_ELEMENT_ARRAY_BARRIER_BIT   0x00000002
 
#define GL_UNIFORM_BARRIER_BIT   0x00000004
 
#define GL_BUFFER_UPDATE_BARRIER_BIT   0x00000200
 
#define GL_SHADER_STORAGE_BARRIER_BIT   0x00002000
 
#define GL_TEXTURE_FETCH_BARRIER_BIT   0x00000008
 
#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT   0x00000020
 
#define GL_PIXEL_BUFFER_BARRIER_BIT   0x00000080
 
#define GL_TEXTURE_UPDATE_BARRIER_BIT   0x00000100
 
#define GL_FRAMEBUFFER_BARRIER_BIT   0x00000400
 
#define GL_ALL_BARRIER_BITS   0xFFFFFFFF
 
#define GL_VERTEX_PROGRAM_POINT_SIZE   0x8642
 
#define GL_POINT_SPRITE   0x8861
 
#define GL_MAP_READ_BIT   0x0001
 
#define GL_MAP_WRITE_BIT   0x0002
 
#define GL_TEXTURE_2D_MULTISAMPLE   0x9100
 
#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY   0x9102
 
#define GL_TEXTURE_EXTERNAL_OES   0x8D65
 
#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_TEXTURE_CUBE_MAP_SEAMLESS   0x884F
 
#define GL_CONTEXT_LOST   0x0507
 
#define GL_PROGRAM_BINARY_LENGTH   0x8741
 
#define GL_NUM_PROGRAM_BINARY_FORMATS   0x87FE
 
#define GL_UNPACK_ROW_LENGTH   0x0CF2
 
#define GL_TEXTURE_3D   0x806F
 
#define GL_TEXTURE_WRAP_R   0x8072
 
#define GL_TEXTURE_RECTANGLE   0x84F5
 
#define GL_TEXTURE_2D_ARRAY   0x8C1A
 
#define GL_MAX_ARRAY_TEXTURE_LAYERS   0x88FF
 
#define GL_MAX_VERTEX_UNIFORM_COMPONENTS   0x8B4A
 
#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS   0x8B49
 
#define GL_MAX_VERTEX_UNIFORM_VECTORS   0x8DFB
 
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS   0x8DFD
 
#define GL_RGB10_A2   0x8059
 
#define GL_UNSIGNED_INT_2_10_10_10_REV   0x8368
 
#define GL_MAX_VARYING_COMPONENTS   0x8B4B
 
#define GL_MAX_VARYING_FLOATS   0x8B4B
 
#define GL_MAX_VARYING_VECTORS   0x8DFC
 
#define GL_TESS_CONTROL_SHADER   0x8E88
 
#define GL_TESS_EVALUATION_SHADER   0x8E87
 
#define GL_PATCH_VERTICES   0x8E72
 
#define GL_LINE   0x1B01
 
#define GL_FILL   0x1B02
 
#define GL_PATCHES   0x000E
 
#define GL_GEOMETRY_SHADER   0x8DD9
 
#define GL_BACK_LEFT   0x0402
 
#define GL_BACK_RIGHT   0x0403
 
#define GL_TEXTURE_1D   0x0DE0
 
#define GL_TEXTURE_1D_ARRAY   0x8C18
 
#define GL_MAX_VERTEX_OUTPUT_COMPONENTS   0x9122
 
#define GL_TIMESTAMP   0x8E28
 
#define GL_QUERY_RESULT   0x8866
 
#define GL_QUERY_RESULT_AVAILABLE   0x8867
 
#define GL_BUFFER   0x82E0
 
#define GL_PROGRAM   0x82E2
 

Functions

static QSurfacecurrentSurfaceForCurrentContext (QOpenGLContext *ctx)
 
static GLenum toGlCompressedTextureFormat (QRhiTexture::Format format, QRhiTexture::Flags flags)
 
static void toGlTextureFormat (QRhiTexture::Format format, const QRhiGles2::Caps &caps, GLenum *glintformat, GLenum *glsizedintformat, GLenum *glformat, GLenum *gltype)
 
static void addBoundaryCommand (QGles2CommandBuffer *cbD, QGles2CommandBuffer::Command::Cmd type, GLuint tsQuery=0)
 
static bool bufferAccessIsWrite (QGles2Buffer::Access access)
 
static bool textureAccessIsWrite (QGles2Texture::Access access)
 
static GLbitfield barriersForBuffer ()
 
static GLbitfield barriersForTexture ()
 
static GLenum toGlTopology (QRhiGraphicsPipeline::Topology t)
 
static GLenum toGlCullMode (QRhiGraphicsPipeline::CullMode c)
 
static GLenum toGlFrontFace (QRhiGraphicsPipeline::FrontFace f)
 
static GLenum toGlBlendFactor (QRhiGraphicsPipeline::BlendFactor f)
 
static GLenum toGlBlendOp (QRhiGraphicsPipeline::BlendOp op)
 
static GLenum toGlCompareOp (QRhiGraphicsPipeline::CompareOp op)
 
static GLenum toGlStencilOp (QRhiGraphicsPipeline::StencilOp op)
 
static GLenum toGlPolygonMode (QRhiGraphicsPipeline::PolygonMode mode)
 
static GLenum toGlMinFilter (QRhiSampler::Filter f, QRhiSampler::Filter m)
 
static GLenum toGlMagFilter (QRhiSampler::Filter f)
 
static GLenum toGlWrapMode (QRhiSampler::AddressMode m)
 
static GLenum toGlTextureCompareFunc (QRhiSampler::CompareOp op)
 
static QGles2Buffer::Access toGlAccess (QRhiPassResourceTracker::BufferAccess access)
 
static QRhiPassResourceTracker::UsageState toPassTrackerUsageState (const QGles2Buffer::UsageState &bufUsage)
 
static QGles2Texture::Access toGlAccess (QRhiPassResourceTracker::TextureAccess access)
 
static QRhiPassResourceTracker::UsageState toPassTrackerUsageState (const QGles2Texture::UsageState &texUsage)
 
static void bindVertexIndexBufferWithStateReset (CommandBufferExecTrackedState *state, QOpenGLExtensions *f, GLenum target, GLuint buffer)
 
template<typename T >
static void qrhi_std140_to_packed (T *dst, int vecSize, int elemCount, const void *src)
 
template<typename T >
void qrhigl_accumulateComputeResource (T *writtenResources, QRhiResource *resource, QRhiShaderResourceBinding::Type bindingType, int loadTypeVal, int storeTypeVal, int loadStoreTypeVal)
 
static GLenum toGlShaderType (QRhiShaderStage::Type type)
 
 Q_GLOBAL_STATIC (QOpenGLProgramBinaryCache, qrhi_programBinaryCache)
 
static QShader::Stage toShaderStage (QRhiShaderStage::Type type)
 
static bool isGraphicsStage (const QRhiShaderStage &shaderStage)
 

Macro Definition Documentation

◆ GL_ALL_BARRIER_BITS

#define GL_ALL_BARRIER_BITS   0xFFFFFFFF

Definition at line 340 of file qrhigles2.cpp.

◆ GL_BACK_LEFT

#define GL_BACK_LEFT   0x0402

Definition at line 488 of file qrhigles2.cpp.

Referenced by QRhiGles2::executeCommandBuffer().

◆ GL_BACK_RIGHT

#define GL_BACK_RIGHT   0x0403

Definition at line 492 of file qrhigles2.cpp.

Referenced by QRhiGles2::executeCommandBuffer().

◆ GL_BGRA

#define GL_BGRA   0x80E1

\variable QRhiGles2NativeHandles::context

Definition at line 156 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_BUFFER

#define GL_BUFFER   0x82E0

Definition at line 524 of file qrhigles2.cpp.

◆ GL_BUFFER_UPDATE_BARRIER_BIT

#define GL_BUFFER_UPDATE_BARRIER_BIT   0x00000200

Definition at line 312 of file qrhigles2.cpp.

Referenced by barriersForBuffer().

◆ GL_COMPARE_REF_TO_TEXTURE

#define GL_COMPARE_REF_TO_TEXTURE   0x884E

Definition at line 268 of file qrhigles2.cpp.

◆ GL_COMPUTE_SHADER

#define GL_COMPUTE_SHADER   0x91B9

Definition at line 296 of file qrhigles2.cpp.

Referenced by toGlShaderType().

◆ GL_CONTEXT_LOST

#define GL_CONTEXT_LOST   0x0507

Definition at line 388 of file qrhigles2.cpp.

◆ GL_DEPTH24_STENCIL8

#define GL_DEPTH24_STENCIL8   0x88F0

Definition at line 232 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_DEPTH_COMPONENT16

#define GL_DEPTH_COMPONENT16   0x81A5

Definition at line 208 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_DEPTH_COMPONENT24

#define GL_DEPTH_COMPONENT24   0x81A6

Definition at line 212 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_DEPTH_COMPONENT32F

#define GL_DEPTH_COMPONENT32F   0x8CAC

Definition at line 216 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_DEPTH_STENCIL

#define GL_DEPTH_STENCIL   0x84F9

Definition at line 240 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_DEPTH_STENCIL_ATTACHMENT

#define GL_DEPTH_STENCIL_ATTACHMENT   0x821A

Definition at line 236 of file qrhigles2.cpp.

◆ GL_DRAW_FRAMEBUFFER

#define GL_DRAW_FRAMEBUFFER   0x8CA9

Definition at line 256 of file qrhigles2.cpp.

◆ GL_ELEMENT_ARRAY_BARRIER_BIT

#define GL_ELEMENT_ARRAY_BARRIER_BIT   0x00000002

Definition at line 304 of file qrhigles2.cpp.

Referenced by barriersForBuffer().

◆ GL_FILL

#define GL_FILL   0x1B02

Definition at line 476 of file qrhigles2.cpp.

Referenced by toGlPolygonMode().

◆ GL_FRAMEBUFFER_BARRIER_BIT

#define GL_FRAMEBUFFER_BARRIER_BIT   0x00000400

Definition at line 336 of file qrhigles2.cpp.

Referenced by barriersForTexture().

◆ GL_FRAMEBUFFER_SRGB

#define GL_FRAMEBUFFER_SRGB   0x8DB9

Definition at line 248 of file qrhigles2.cpp.

◆ GL_GEOMETRY_SHADER

#define GL_GEOMETRY_SHADER   0x8DD9

Definition at line 484 of file qrhigles2.cpp.

Referenced by toGlShaderType().

◆ GL_HALF_FLOAT

#define GL_HALF_FLOAT   0x140B

Definition at line 204 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_LINE

#define GL_LINE   0x1B01

Definition at line 472 of file qrhigles2.cpp.

Referenced by toGlPolygonMode().

◆ GL_MAP_READ_BIT

#define GL_MAP_READ_BIT   0x0001

Definition at line 352 of file qrhigles2.cpp.

◆ GL_MAP_WRITE_BIT

#define GL_MAP_WRITE_BIT   0x0002

Definition at line 356 of file qrhigles2.cpp.

◆ GL_MAX_ARRAY_TEXTURE_LAYERS

#define GL_MAX_ARRAY_TEXTURE_LAYERS   0x88FF

Definition at line 420 of file qrhigles2.cpp.

◆ GL_MAX_COMPUTE_WORK_GROUP_COUNT

#define GL_MAX_COMPUTE_WORK_GROUP_COUNT   0x91BE

Definition at line 376 of file qrhigles2.cpp.

◆ GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS

#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS   0x90EB

Definition at line 372 of file qrhigles2.cpp.

◆ GL_MAX_COMPUTE_WORK_GROUP_SIZE

#define GL_MAX_COMPUTE_WORK_GROUP_SIZE   0x91BF

Definition at line 380 of file qrhigles2.cpp.

◆ GL_MAX_DRAW_BUFFERS

#define GL_MAX_DRAW_BUFFERS   0x8824

Definition at line 260 of file qrhigles2.cpp.

◆ GL_MAX_FRAGMENT_UNIFORM_COMPONENTS

#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS   0x8B49

Definition at line 428 of file qrhigles2.cpp.

◆ GL_MAX_FRAGMENT_UNIFORM_VECTORS

#define GL_MAX_FRAGMENT_UNIFORM_VECTORS   0x8DFD

Definition at line 436 of file qrhigles2.cpp.

◆ GL_MAX_SAMPLES

#define GL_MAX_SAMPLES   0x8D57

Definition at line 276 of file qrhigles2.cpp.

◆ GL_MAX_VARYING_COMPONENTS

#define GL_MAX_VARYING_COMPONENTS   0x8B4B

Definition at line 448 of file qrhigles2.cpp.

◆ GL_MAX_VARYING_FLOATS

#define GL_MAX_VARYING_FLOATS   0x8B4B

Definition at line 452 of file qrhigles2.cpp.

◆ GL_MAX_VARYING_VECTORS

#define GL_MAX_VARYING_VECTORS   0x8DFC

Definition at line 456 of file qrhigles2.cpp.

◆ GL_MAX_VERTEX_OUTPUT_COMPONENTS

#define GL_MAX_VERTEX_OUTPUT_COMPONENTS   0x9122

Definition at line 508 of file qrhigles2.cpp.

◆ GL_MAX_VERTEX_UNIFORM_COMPONENTS

#define GL_MAX_VERTEX_UNIFORM_COMPONENTS   0x8B4A

Definition at line 424 of file qrhigles2.cpp.

◆ GL_MAX_VERTEX_UNIFORM_VECTORS

#define GL_MAX_VERTEX_UNIFORM_VECTORS   0x8DFB

Definition at line 432 of file qrhigles2.cpp.

◆ GL_NUM_PROGRAM_BINARY_FORMATS

#define GL_NUM_PROGRAM_BINARY_FORMATS   0x87FE

Definition at line 396 of file qrhigles2.cpp.

◆ GL_PATCH_VERTICES

#define GL_PATCH_VERTICES   0x8E72

Definition at line 468 of file qrhigles2.cpp.

◆ GL_PATCHES

#define GL_PATCHES   0x000E

Definition at line 480 of file qrhigles2.cpp.

Referenced by toGlTopology().

◆ GL_PIXEL_BUFFER_BARRIER_BIT

#define GL_PIXEL_BUFFER_BARRIER_BIT   0x00000080

Definition at line 328 of file qrhigles2.cpp.

Referenced by barriersForTexture().

◆ GL_POINT_SPRITE

#define GL_POINT_SPRITE   0x8861

Definition at line 348 of file qrhigles2.cpp.

◆ GL_PRIMITIVE_RESTART_FIXED_INDEX

#define GL_PRIMITIVE_RESTART_FIXED_INDEX   0x8D69

Definition at line 244 of file qrhigles2.cpp.

◆ GL_PROGRAM

#define GL_PROGRAM   0x82E2

Definition at line 528 of file qrhigles2.cpp.

◆ GL_PROGRAM_BINARY_LENGTH

#define GL_PROGRAM_BINARY_LENGTH   0x8741

Definition at line 392 of file qrhigles2.cpp.

◆ GL_QUERY_RESULT

#define GL_QUERY_RESULT   0x8866

Definition at line 516 of file qrhigles2.cpp.

◆ GL_QUERY_RESULT_AVAILABLE

#define GL_QUERY_RESULT_AVAILABLE   0x8867

Definition at line 520 of file qrhigles2.cpp.

◆ GL_R16

#define GL_R16   0x822A

Definition at line 172 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_R16F

#define GL_R16F   0x822D

Definition at line 196 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_R32F

#define GL_R32F   0x822E

Definition at line 200 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_R8

#define GL_R8   0x8229

Definition at line 160 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_READ_FRAMEBUFFER

#define GL_READ_FRAMEBUFFER   0x8CA8

Definition at line 252 of file qrhigles2.cpp.

◆ GL_READ_ONLY

#define GL_READ_ONLY   0x88B8

Definition at line 284 of file qrhigles2.cpp.

◆ GL_READ_WRITE

#define GL_READ_WRITE   0x88BA

Definition at line 292 of file qrhigles2.cpp.

◆ GL_RED

◆ GL_RG

#define GL_RG   0x8227

Definition at line 168 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_RG16

#define GL_RG16   0x822C

Definition at line 176 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_RG8

#define GL_RG8   0x822B

Definition at line 164 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_RGB10_A2

#define GL_RGB10_A2   0x8059

Definition at line 440 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_RGBA16F

#define GL_RGBA16F   0x881A

Definition at line 192 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_RGBA32F

#define GL_RGBA32F   0x8814

Definition at line 188 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_RGBA8

◆ GL_SHADER_IMAGE_ACCESS_BARRIER_BIT

#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT   0x00000020

Definition at line 324 of file qrhigles2.cpp.

Referenced by barriersForTexture().

◆ GL_SHADER_STORAGE_BARRIER_BIT

#define GL_SHADER_STORAGE_BARRIER_BIT   0x00002000

Definition at line 316 of file qrhigles2.cpp.

Referenced by barriersForBuffer().

◆ GL_SHADER_STORAGE_BUFFER

#define GL_SHADER_STORAGE_BUFFER   0x90D2

Definition at line 280 of file qrhigles2.cpp.

◆ GL_STENCIL_INDEX

#define GL_STENCIL_INDEX   0x1901

◆ GL_STENCIL_INDEX8

#define GL_STENCIL_INDEX8   0x8D48

Definition at line 228 of file qrhigles2.cpp.

◆ GL_TESS_CONTROL_SHADER

#define GL_TESS_CONTROL_SHADER   0x8E88

Definition at line 460 of file qrhigles2.cpp.

Referenced by toGlShaderType().

◆ GL_TESS_EVALUATION_SHADER

#define GL_TESS_EVALUATION_SHADER   0x8E87

Definition at line 464 of file qrhigles2.cpp.

Referenced by toGlShaderType().

◆ GL_TEXTURE_1D

#define GL_TEXTURE_1D   0x0DE0

Definition at line 496 of file qrhigles2.cpp.

Referenced by QRhiGles2::executeCommandBuffer(), and QGles2Texture::prepareCreate().

◆ GL_TEXTURE_1D_ARRAY

#define GL_TEXTURE_1D_ARRAY   0x8C18

Definition at line 500 of file qrhigles2.cpp.

◆ GL_TEXTURE_2D_ARRAY

#define GL_TEXTURE_2D_ARRAY   0x8C1A

Definition at line 416 of file qrhigles2.cpp.

◆ GL_TEXTURE_2D_MULTISAMPLE

#define GL_TEXTURE_2D_MULTISAMPLE   0x9100

Definition at line 360 of file qrhigles2.cpp.

◆ GL_TEXTURE_2D_MULTISAMPLE_ARRAY

#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY   0x9102

Definition at line 364 of file qrhigles2.cpp.

◆ GL_TEXTURE_3D

#define GL_TEXTURE_3D   0x806F

Definition at line 404 of file qrhigles2.cpp.

◆ GL_TEXTURE_COMPARE_FUNC

#define GL_TEXTURE_COMPARE_FUNC   0x884D

Definition at line 272 of file qrhigles2.cpp.

◆ GL_TEXTURE_COMPARE_MODE

#define GL_TEXTURE_COMPARE_MODE   0x884C

Definition at line 264 of file qrhigles2.cpp.

◆ GL_TEXTURE_CUBE_MAP_SEAMLESS

#define GL_TEXTURE_CUBE_MAP_SEAMLESS   0x884F

Definition at line 384 of file qrhigles2.cpp.

◆ GL_TEXTURE_EXTERNAL_OES

#define GL_TEXTURE_EXTERNAL_OES   0x8D65

Definition at line 368 of file qrhigles2.cpp.

◆ GL_TEXTURE_FETCH_BARRIER_BIT

#define GL_TEXTURE_FETCH_BARRIER_BIT   0x00000008

Definition at line 320 of file qrhigles2.cpp.

Referenced by barriersForTexture().

◆ GL_TEXTURE_RECTANGLE

#define GL_TEXTURE_RECTANGLE   0x84F5

Definition at line 412 of file qrhigles2.cpp.

◆ GL_TEXTURE_UPDATE_BARRIER_BIT

#define GL_TEXTURE_UPDATE_BARRIER_BIT   0x00000100

Definition at line 332 of file qrhigles2.cpp.

Referenced by barriersForTexture().

◆ GL_TEXTURE_WRAP_R

#define GL_TEXTURE_WRAP_R   0x8072

Definition at line 408 of file qrhigles2.cpp.

◆ GL_TIMESTAMP

#define GL_TIMESTAMP   0x8E28

Definition at line 512 of file qrhigles2.cpp.

◆ GL_UNIFORM_BARRIER_BIT

#define GL_UNIFORM_BARRIER_BIT   0x00000004

Definition at line 308 of file qrhigles2.cpp.

Referenced by barriersForBuffer().

◆ GL_UNPACK_ROW_LENGTH

#define GL_UNPACK_ROW_LENGTH   0x0CF2

Definition at line 400 of file qrhigles2.cpp.

◆ GL_UNSIGNED_INT_24_8

#define GL_UNSIGNED_INT_24_8   0x84FA

Definition at line 220 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_UNSIGNED_INT_2_10_10_10_REV

#define GL_UNSIGNED_INT_2_10_10_10_REV   0x8368

Definition at line 444 of file qrhigles2.cpp.

Referenced by toGlTextureFormat().

◆ GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT

#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT   0x00000001

Definition at line 300 of file qrhigles2.cpp.

Referenced by barriersForBuffer().

◆ GL_VERTEX_PROGRAM_POINT_SIZE

#define GL_VERTEX_PROGRAM_POINT_SIZE   0x8642

Definition at line 344 of file qrhigles2.cpp.

◆ GL_WRITE_ONLY

#define GL_WRITE_ONLY   0x88B9

Definition at line 288 of file qrhigles2.cpp.

Function Documentation

◆ addBoundaryCommand()

static void addBoundaryCommand ( QGles2CommandBuffer * cbD,
QGles2CommandBuffer::Command::Cmd type,
GLuint tsQuery = 0 )
inlinestatic

Definition at line 2038 of file qrhigles2.cpp.

References QGles2CommandBuffer::Command::args, QGles2CommandBuffer::Command::BeginFrame, QGles2CommandBuffer::Command::cmd, QGles2CommandBuffer::commands, and QGles2CommandBuffer::Command::EndFrame.

Referenced by QRhiGles2::beginFrame(), QRhiGles2::beginOffscreenFrame(), QRhiGles2::endExternal(), QRhiGles2::endFrame(), and QRhiGles2::endOffscreenFrame().

+ Here is the caller graph for this function:

◆ barriersForBuffer()

static GLbitfield barriersForBuffer ( )
inlinestatic

Definition at line 2270 of file qrhigles2.cpp.

References GL_BUFFER_UPDATE_BARRIER_BIT, GL_ELEMENT_ARRAY_BARRIER_BIT, GL_SHADER_STORAGE_BARRIER_BIT, GL_UNIFORM_BARRIER_BIT, and GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT.

Referenced by QRhiGles2::executeCommandBuffer(), and QRhiGles2::trackedBufferBarrier().

+ Here is the caller graph for this function:

◆ barriersForTexture()

static GLbitfield barriersForTexture ( )
inlinestatic

Definition at line 2279 of file qrhigles2.cpp.

References GL_FRAMEBUFFER_BARRIER_BIT, GL_PIXEL_BUFFER_BARRIER_BIT, GL_SHADER_IMAGE_ACCESS_BARRIER_BIT, GL_TEXTURE_FETCH_BARRIER_BIT, and GL_TEXTURE_UPDATE_BARRIER_BIT.

Referenced by QRhiGles2::executeCommandBuffer(), and QRhiGles2::trackedImageBarrier().

+ Here is the caller graph for this function:

◆ bindVertexIndexBufferWithStateReset()

static void bindVertexIndexBufferWithStateReset ( CommandBufferExecTrackedState * state,
QOpenGLExtensions * f,
GLenum target,
GLuint buffer )
inlinestatic

Definition at line 2959 of file qrhigles2.cpp.

References state.

Referenced by QRhiGles2::executeCommandBuffer().

+ Here is the caller graph for this function:

◆ bufferAccessIsWrite()

static bool bufferAccessIsWrite ( QGles2Buffer::Access access)
static

Definition at line 2255 of file qrhigles2.cpp.

References QGles2Buffer::AccessStorageReadWrite, QGles2Buffer::AccessStorageWrite, and QGles2Buffer::AccessUpdate.

Referenced by QRhiGles2::executeCommandBuffer(), and QRhiGles2::trackedBufferBarrier().

+ Here is the caller graph for this function:

◆ currentSurfaceForCurrentContext()

static QSurface * currentSurfaceForCurrentContext ( QOpenGLContext * ctx)
inlinestatic

Definition at line 595 of file qrhigles2.cpp.

References QOpenGLContext::currentContext(), and QSurface::Window.

Referenced by QRhiGles2::ensureContext().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isGraphicsStage()

static bool isGraphicsStage ( const QRhiShaderStage & shaderStage)
inlinestatic

Definition at line 6262 of file qrhigles2.cpp.

References QRhiShaderStage::Fragment, QRhiShaderStage::Geometry, QRhiShaderStage::TessellationControl, QRhiShaderStage::TessellationEvaluation, QRhiShaderStage::type(), and QRhiShaderStage::Vertex.

Referenced by QGles2GraphicsPipeline::create().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Q_GLOBAL_STATIC()

Q_GLOBAL_STATIC ( QOpenGLProgramBinaryCache ,
qrhi_programBinaryCache  )

◆ qrhi_std140_to_packed()

template<typename T >
static void qrhi_std140_to_packed ( T * dst,
int vecSize,
int elemCount,
const void * src )
inlinestatic

Definition at line 3971 of file qrhigles2.cpp.

References i, and j.

Referenced by QRhiGles2::bindShaderResources().

+ Here is the caller graph for this function:

◆ qrhigl_accumulateComputeResource()

template<typename T >
void qrhigl_accumulateComputeResource ( T * writtenResources,
QRhiResource * resource,
QRhiShaderResourceBinding::Type bindingType,
int loadTypeVal,
int storeTypeVal,
int loadStoreTypeVal )
inline

Definition at line 4744 of file qrhigles2.cpp.

References it, QGles2CommandBuffer::ComputePassState::Read, and QGles2CommandBuffer::ComputePassState::Write.

Referenced by QRhiGles2::dispatch().

+ Here is the caller graph for this function:

◆ textureAccessIsWrite()

static bool textureAccessIsWrite ( QGles2Texture::Access access)
static

Definition at line 2262 of file qrhigles2.cpp.

References QGles2Texture::AccessFramebuffer, QGles2Texture::AccessStorageReadWrite, QGles2Texture::AccessStorageWrite, and QGles2Texture::AccessUpdate.

Referenced by QRhiGles2::executeCommandBuffer(), and QRhiGles2::trackedImageBarrier().

+ Here is the caller graph for this function:

◆ toGlAccess() [1/2]

◆ toGlAccess() [2/2]

◆ toGlBlendFactor()

◆ toGlBlendOp()

static GLenum toGlBlendOp ( QRhiGraphicsPipeline::BlendOp op)
inlinestatic

Definition at line 2708 of file qrhigles2.cpp.

References QRhiGraphicsPipeline::Add, GL_FUNC_ADD, GL_FUNC_REVERSE_SUBTRACT, GL_FUNC_SUBTRACT, GL_MAX, GL_MIN, QRhiGraphicsPipeline::Max, QRhiGraphicsPipeline::Min, QRhiGraphicsPipeline::ReverseSubtract, and QRhiGraphicsPipeline::Subtract.

Referenced by QRhiGles2::executeBindGraphicsPipeline().

+ Here is the caller graph for this function:

◆ toGlCompareOp()

static GLenum toGlCompareOp ( QRhiGraphicsPipeline::CompareOp op)
inlinestatic

Definition at line 2726 of file qrhigles2.cpp.

References QRhiGraphicsPipeline::Always, QRhiGraphicsPipeline::Equal, QRhiGraphicsPipeline::Greater, QRhiGraphicsPipeline::GreaterOrEqual, QRhiGraphicsPipeline::Less, QRhiGraphicsPipeline::LessOrEqual, QRhiGraphicsPipeline::Never, and QRhiGraphicsPipeline::NotEqual.

Referenced by QRhiGles2::executeBindGraphicsPipeline(), and QRhiGles2::executeCommandBuffer().

+ Here is the caller graph for this function:

◆ toGlCompressedTextureFormat()

◆ toGlCullMode()

static GLenum toGlCullMode ( QRhiGraphicsPipeline::CullMode c)
inlinestatic

Definition at line 2640 of file qrhigles2.cpp.

References QRhiGraphicsPipeline::Back, and QRhiGraphicsPipeline::Front.

Referenced by QRhiGles2::executeBindGraphicsPipeline().

+ Here is the caller graph for this function:

◆ toGlFrontFace()

static GLenum toGlFrontFace ( QRhiGraphicsPipeline::FrontFace f)
inlinestatic

Definition at line 2652 of file qrhigles2.cpp.

References QRhiGraphicsPipeline::CCW, and QRhiGraphicsPipeline::CW.

Referenced by QRhiGles2::executeBindGraphicsPipeline().

+ Here is the caller graph for this function:

◆ toGlMagFilter()

static GLenum toGlMagFilter ( QRhiSampler::Filter f)
inlinestatic

Definition at line 2804 of file qrhigles2.cpp.

References QRhiSampler::Linear, and QRhiSampler::Nearest.

Referenced by QGles2Sampler::create().

+ Here is the caller graph for this function:

◆ toGlMinFilter()

static GLenum toGlMinFilter ( QRhiSampler::Filter f,
QRhiSampler::Filter m )
inlinestatic

Definition at line 2786 of file qrhigles2.cpp.

References QRhiSampler::Linear, QRhiSampler::Nearest, and QRhiSampler::None.

Referenced by QGles2Sampler::create().

+ Here is the caller graph for this function:

◆ toGlPolygonMode()

static GLenum toGlPolygonMode ( QRhiGraphicsPipeline::PolygonMode mode)
inlinestatic

Definition at line 2774 of file qrhigles2.cpp.

References QRhiGraphicsPipeline::Fill, GL_FILL, GL_LINE, and QRhiGraphicsPipeline::Line.

Referenced by QRhiGles2::executeBindGraphicsPipeline().

+ Here is the caller graph for this function:

◆ toGlShaderType()

static GLenum toGlShaderType ( QRhiShaderStage::Type type)
inlinestatic

Definition at line 4839 of file qrhigles2.cpp.

References QRhiShaderStage::Compute, QRhiShaderStage::Fragment, QRhiShaderStage::Geometry, GL_COMPUTE_SHADER, GL_FRAGMENT_SHADER, GL_GEOMETRY_SHADER, GL_TESS_CONTROL_SHADER, GL_TESS_EVALUATION_SHADER, GL_VERTEX_SHADER, QRhiShaderStage::TessellationControl, QRhiShaderStage::TessellationEvaluation, and QRhiShaderStage::Vertex.

Referenced by QRhiGles2::compileShader().

+ Here is the caller graph for this function:

◆ toGlStencilOp()

static GLenum toGlStencilOp ( QRhiGraphicsPipeline::StencilOp op)
inlinestatic

◆ toGlTextureCompareFunc()

static GLenum toGlTextureCompareFunc ( QRhiSampler::CompareOp op)
inlinestatic

Definition at line 2830 of file qrhigles2.cpp.

References QRhiSampler::Always, QRhiSampler::Equal, QRhiSampler::Greater, QRhiSampler::GreaterOrEqual, QRhiSampler::Less, QRhiSampler::LessOrEqual, QRhiSampler::Never, and QRhiSampler::NotEqual.

Referenced by QGles2Sampler::create().

+ Here is the caller graph for this function:

◆ toGlTextureFormat()

◆ toGlTopology()

static GLenum toGlTopology ( QRhiGraphicsPipeline::Topology t)
inlinestatic

Definition at line 2618 of file qrhigles2.cpp.

References GL_PATCHES, QRhiGraphicsPipeline::Lines, QRhiGraphicsPipeline::LineStrip, QRhiGraphicsPipeline::Patches, QRhiGraphicsPipeline::Points, QRhiGraphicsPipeline::TriangleFan, QRhiGraphicsPipeline::Triangles, and QRhiGraphicsPipeline::TriangleStrip.

Referenced by QGles2GraphicsPipeline::create().

+ Here is the caller graph for this function:

◆ toGlWrapMode()

static GLenum toGlWrapMode ( QRhiSampler::AddressMode m)
inlinestatic

Definition at line 2816 of file qrhigles2.cpp.

References QRhiSampler::ClampToEdge, GL_CLAMP_TO_EDGE, GL_MIRRORED_REPEAT, QRhiSampler::Mirror, and QRhiSampler::Repeat.

Referenced by QGles2Sampler::create().

+ Here is the caller graph for this function:

◆ toPassTrackerUsageState() [1/2]

static QRhiPassResourceTracker::UsageState toPassTrackerUsageState ( const QGles2Buffer::UsageState & bufUsage)
inlinestatic

Definition at line 2876 of file qrhigles2.cpp.

References QRhiPassResourceTracker::UsageState::access, QRhiPassResourceTracker::UsageState::layout, and QRhiPassResourceTracker::UsageState::stage.

Referenced by QRhiGles2::trackedRegisterBuffer(), QRhiVulkan::trackedRegisterBuffer(), QRhiGles2::trackedRegisterTexture(), and QRhiVulkan::trackedRegisterTexture().

+ Here is the caller graph for this function:

◆ toPassTrackerUsageState() [2/2]

◆ toShaderStage()