![]() |
Qt 6.x
The Qt SDK
|
#include "qrhimetal_p.h"#include "qshader_p.h"#include <QGuiApplication>#include <QWindow>#include <QUrl>#include <QFile>#include <QTemporaryFile>#include <QFileInfo>#include <qmath.h>#include <QOperatingSystemVersion>#include <QtCore/private/qcore_mac_p.h>#include <UIKit/UIKit.h>#include <Metal/Metal.h>#include <QuartzCore/CAMetalLayer.h>
Include dependency graph for qrhimetal.mm:Go to the source code of this file.
Enumerations | |
| enum class | BindingType { Buffer , Texture , Sampler } |
|
strong |
| Enumerator | |
|---|---|
| Buffer | |
| Texture | |
| Sampler | |
Definition at line 1093 of file qrhimetal.mm.
|
static |
Definition at line 5177 of file qrhimetal.mm.
References addUnusedVertexAttribute(), aligned(), alignment, QRhiImplementation::byteSizePerVertexForVertexInputFormat(), elements, QRhiImplementation::shaderDescVariableFormatToVertexInputFormat(), and QShaderDescription::Struct.
Referenced by addUnusedVertexAttribute(), and QMetalGraphicsPipelineData::Tessellation::teseFragRenderPipeline().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 5207 of file qrhimetal.mm.
References addVertexAttribute(), aligned(), alignment, QRhiImplementation::byteSizePerVertexForVertexInputFormat(), elements, indexTaken(), nextAttributeIndex(), Q_ASSERT, QRhiImplementation::shaderDescVariableFormatToVertexInputFormat(), QShaderDescription::Struct, takeIndex(), and toMetalAttributeFormat().
Referenced by addVertexAttribute(), and QMetalGraphicsPipelineData::Tessellation::teseFragRenderPipeline().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 483 of file qrhimetal.mm.
Referenced by addUnusedVertexAttribute(), addVertexAttribute(), and QMetalGraphicsPipelineData::Tessellation::teseFragRenderPipeline().
Here is the caller graph for this function:Definition at line 5171 of file qrhimetal.mm.
References alignment.
|
inlinestatic |
Definition at line 1118 of file qrhimetal.mm.
References QMetalShaderResourceBindingsData::COMPUTE, QVarLengthArray< T, Prealloc >::constData(), QMetalCommandBufferData::currentComputePassEncoder, QMetalCommandBufferData::currentRenderPassEncoder, QMetalCommandBuffer::d, QMetalShaderResourceBindingsData::FRAGMENT, QRhiBatchedBindings< T >::Batch::resources, QMetalShaderResourceBindingsData::TESSCTRL, QMetalShaderResourceBindingsData::TESSEVAL, and QMetalShaderResourceBindingsData::VERTEX.
Referenced by QRhiMetal::enqueueShaderResourceBindings(), and rebindShaderResources().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1176 of file qrhimetal.mm.
References QMetalShaderResourceBindingsData::COMPUTE, QMetalCommandBufferData::currentComputePassEncoder, QMetalCommandBufferData::currentRenderPassEncoder, QMetalCommandBuffer::d, QMetalShaderResourceBindingsData::FRAGMENT, QMetalShaderResourceBindingsData::TESSCTRL, QMetalShaderResourceBindingsData::TESSEVAL, and QMetalShaderResourceBindingsData::VERTEX.
Referenced by QRhiMetal::enqueueShaderResourceBindings(), and rebindShaderResources().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1149 of file qrhimetal.mm.
References QMetalShaderResourceBindingsData::COMPUTE, QMetalCommandBufferData::currentComputePassEncoder, QMetalCommandBufferData::currentRenderPassEncoder, QMetalCommandBuffer::d, QMetalShaderResourceBindingsData::FRAGMENT, QMetalShaderResourceBindingsData::TESSCTRL, QMetalShaderResourceBindingsData::TESSEVAL, and QMetalShaderResourceBindingsData::VERTEX.
Referenced by QRhiMetal::enqueueShaderResourceBindings(), and rebindShaderResources().
Here is the caller graph for this function:
|
static |
Definition at line 4891 of file qrhimetal.mm.
References d, iOS, and qCDebug.
Referenced by QRhiMetalData::addComputePipelineToBinaryArchive(), and QRhiMetalData::addRenderPipelineToBinaryArchive().
Here is the caller graph for this function:
|
static |
Definition at line 1908 of file qrhimetal.mm.
References QVarLengthArray< T, Prealloc >::append(), QMetalCommandBufferData::cb, QMetalRenderTargetData::colorAttCount, QMetalCommandBufferData::currentPassRpDesc, QMetalCommandBufferData::currentRenderPassEncoder, QMetalCommandBuffer::currentTarget, QMetalCommandBuffer::d, QMetalRenderTargetData::dsAttCount, i, Q_ASSERT, QRHI_RES, QMetalCommandBuffer::resetPerPassCachedState(), QRhiResource::resourceType(), QRhiResource::SwapChainRenderTarget, QMetalCommandBufferData::tessellationComputeEncoder, and QRhiResource::TextureRenderTarget.
Referenced by QRhiMetal::tessellatedDraw().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 5145 of file qrhimetal.mm.
Referenced by addVertexAttribute(), and nextAttributeIndex().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 6144 of file qrhimetal.mm.
References Q_ASSERT, view, and window().
Referenced by QRhiMetal::updateSwapChainProxyData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1099 of file qrhimetal.mm.
References QMap< Key, T >::cend(), QMap< Key, T >::constFind(), QMap< Key, T >::isEmpty(), it, map, and Sampler.
Here is the call graph for this function:
|
inlinestatic |
Definition at line 5248 of file qrhimetal.mm.
References i, match(), and matches().
Referenced by matches(), matches(), and QMetalGraphicsPipelineData::Tessellation::teseFragRenderPipeline().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 5263 of file qrhimetal.mm.
References matches().
Here is the call graph for this function:
|
inlinestatic |
Definition at line 5155 of file qrhimetal.mm.
References indexTaken().
Referenced by addVertexAttribute(), and QMetalGraphicsPipelineData::Tessellation::teseFragRenderPipeline().
Here is the call graph for this function:
Here is the caller graph for this function:| Q_DECLARE_TYPEINFO | ( | QRhiMetalData::DeferredReleaseEntry | , |
| Q_RELOCATABLE_TYPE | |||
| ) |
| Q_DECLARE_TYPEINFO | ( | QRhiMetalData::TextureReadback | , |
| Q_RELOCATABLE_TYPE | |||
| ) |
|
static |
Definition at line 3068 of file qrhimetal.mm.
References e, i, QMTL_FRAMES_IN_FLIGHT, and release().
Referenced by QRhiMetal::executeDeferredReleases().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 3074 of file qrhimetal.mm.
Referenced by QRhiMetal::executeDeferredReleases().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 3088 of file qrhimetal.mm.
Referenced by QRhiMetal::executeDeferredReleases().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 3079 of file qrhimetal.mm.
References e, i, QRhi::MAX_MIP_LEVELS, QMTL_FRAMES_IN_FLIGHT, and release().
Referenced by QRhiMetal::executeDeferredReleases().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1208 of file qrhimetal.mm.
References QRhiBatchedBindings< T >::batches, bindStageBuffers(), bindStageSamplers(), bindStageTextures(), QMetalShaderResourceBindingsData::Stage::bufferBatches, QMetalShaderResourceBindingsData::Stage::bufferOffsetBatches, QMetalCommandBufferData::currentShaderResourceBindingState, QMetalCommandBuffer::d, i, QMetalShaderResourceBindingsData::res, QMetalShaderResourceBindingsData::Stage::samplerBatches, and QMetalShaderResourceBindingsData::Stage::textureBatches.
Referenced by QRhiMetal::tessellatedDraw().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 5150 of file qrhimetal.mm.
Referenced by addVertexAttribute().
Here is the caller graph for this function:
|
static |
Definition at line 1895 of file qrhimetal.mm.
References QMetalCommandBufferData::cb, QMetalCommandBufferData::currentRenderPassEncoder, QMetalCommandBuffer::d, and QMetalCommandBufferData::tessellationComputeEncoder.
Referenced by QRhiMetal::tessellatedDraw().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 3944 of file qrhimetal.mm.
References QRhiSampler::ClampToEdge, QRhiSampler::Mirror, and QRhiSampler::Repeat.
Referenced by QMetalSampler::create().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 4378 of file qrhimetal.mm.
References QRhiVertexInputAttribute::Float, QRhiVertexInputAttribute::Float2, QRhiVertexInputAttribute::Float3, QRhiVertexInputAttribute::Float4, QRhiVertexInputAttribute::Half, QRhiVertexInputAttribute::Half2, QRhiVertexInputAttribute::Half3, QRhiVertexInputAttribute::Half4, QRhiVertexInputAttribute::SInt, QRhiVertexInputAttribute::SInt2, QRhiVertexInputAttribute::SInt3, QRhiVertexInputAttribute::SInt4, QRhiVertexInputAttribute::UInt, QRhiVertexInputAttribute::UInt2, QRhiVertexInputAttribute::UInt3, QRhiVertexInputAttribute::UInt4, QRhiVertexInputAttribute::UNormByte, QRhiVertexInputAttribute::UNormByte2, and QRhiVertexInputAttribute::UNormByte4.
Referenced by addVertexAttribute(), QMetalGraphicsPipelineData::setupStageInputDescriptor(), and QMetalGraphicsPipelineData::setupVertexInputDescriptor().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 4425 of file qrhimetal.mm.
References QRhiGraphicsPipeline::ConstantAlpha, QRhiGraphicsPipeline::ConstantColor, QRhiGraphicsPipeline::DstAlpha, QRhiGraphicsPipeline::DstColor, QRhiGraphicsPipeline::One, QRhiGraphicsPipeline::OneMinusConstantAlpha, QRhiGraphicsPipeline::OneMinusConstantColor, QRhiGraphicsPipeline::OneMinusDstAlpha, QRhiGraphicsPipeline::OneMinusDstColor, QRhiGraphicsPipeline::OneMinusSrc1Alpha, QRhiGraphicsPipeline::OneMinusSrc1Color, QRhiGraphicsPipeline::OneMinusSrcAlpha, QRhiGraphicsPipeline::OneMinusSrcColor, QRhiGraphicsPipeline::Src1Alpha, QRhiGraphicsPipeline::Src1Color, QRhiGraphicsPipeline::SrcAlpha, QRhiGraphicsPipeline::SrcAlphaSaturate, QRhiGraphicsPipeline::SrcColor, and QRhiGraphicsPipeline::Zero.
Referenced by QMetalGraphicsPipeline::setupAttachmentsInMetalRenderPassDescriptor().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 4472 of file qrhimetal.mm.
References QRhiGraphicsPipeline::Add, QRhiGraphicsPipeline::Max, QRhiGraphicsPipeline::Min, QRhiGraphicsPipeline::ReverseSubtract, and QRhiGraphicsPipeline::Subtract.
Referenced by QMetalGraphicsPipeline::setupAttachmentsInMetalRenderPassDescriptor().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 4491 of file qrhimetal.mm.
References QRhiGraphicsPipeline::A, QRhiGraphicsPipeline::B, QRhiGraphicsPipeline::G, and QRhiGraphicsPipeline::R.
Referenced by QMetalGraphicsPipeline::setupAttachmentsInMetalRenderPassDescriptor().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 4505 of file qrhimetal.mm.
References QRhiGraphicsPipeline::Always, QRhiGraphicsPipeline::Equal, QRhiGraphicsPipeline::Greater, QRhiGraphicsPipeline::GreaterOrEqual, QRhiGraphicsPipeline::Less, QRhiGraphicsPipeline::LessOrEqual, QRhiGraphicsPipeline::Never, and QRhiGraphicsPipeline::NotEqual.
Referenced by QMetalGraphicsPipeline::setupMetalDepthStencilDescriptor().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 4592 of file qrhimetal.mm.
References QRhiGraphicsPipeline::Back, QRhiGraphicsPipeline::Front, and QRhiGraphicsPipeline::None.
Referenced by QMetalGraphicsPipeline::mapStates().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 3916 of file qrhimetal.mm.
References QRhiSampler::Linear, and QRhiSampler::Nearest.
Referenced by QMetalSampler::create().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 4648 of file qrhimetal.mm.
References QShaderVersion::version().
Referenced by QRhiMetalData::createMetalLib().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 3929 of file qrhimetal.mm.
References QRhiSampler::Linear, QRhiSampler::Nearest, and QRhiSampler::None.
Referenced by QMetalSampler::create().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 4574 of file qrhimetal.mm.
References QRhiGraphicsPipeline::Lines, QRhiGraphicsPipeline::LineStrip, QRhiGraphicsPipeline::Points, QRhiGraphicsPipeline::TriangleFan, QRhiGraphicsPipeline::Triangles, and QRhiGraphicsPipeline::TriangleStrip.
Referenced by QMetalGraphicsPipeline::createVertexFragmentPipeline().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 4555 of file qrhimetal.mm.
References QRhiGraphicsPipeline::Lines, QRhiGraphicsPipeline::LineStrip, QRhiGraphicsPipeline::Points, QRhiGraphicsPipeline::Triangles, and QRhiGraphicsPipeline::TriangleStrip.
Referenced by QMetalGraphicsPipeline::createVertexFragmentPipeline().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 4530 of file qrhimetal.mm.
References QRhiGraphicsPipeline::DecrementAndClamp, QRhiGraphicsPipeline::DecrementAndWrap, QRhiGraphicsPipeline::IncrementAndClamp, QRhiGraphicsPipeline::IncrementAndWrap, QRhiGraphicsPipeline::Invert, QRhiGraphicsPipeline::Keep, QRhiGraphicsPipeline::Replace, and QRhiGraphicsPipeline::StencilZero.
Referenced by QMetalGraphicsPipeline::setupMetalDepthStencilDescriptor().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 4633 of file qrhimetal.mm.
References QShaderDescription::EqualTessellationPartitioning, QShaderDescription::FractionalEvenTessellationPartitioning, and QShaderDescription::FractionalOddTessellationPartitioning.
Referenced by QMetalGraphicsPipelineData::Tessellation::teseFragRenderPipeline().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 4620 of file qrhimetal.mm.
References QShaderDescription::CcwTessellationWindingOrder, and QShaderDescription::CwTessellationWindingOrder.
Referenced by QMetalGraphicsPipelineData::Tessellation::teseFragRenderPipeline().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 3959 of file qrhimetal.mm.
References QRhiSampler::Always, QRhiSampler::Equal, QRhiSampler::Greater, QRhiSampler::GreaterOrEqual, QRhiSampler::Less, QRhiSampler::LessOrEqual, QRhiSampler::Never, and QRhiSampler::NotEqual.
Referenced by QMetalSampler::create().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 3305 of file qrhimetal.mm.
References QRhiTexture::ASTC_10x10, QRhiTexture::ASTC_10x5, QRhiTexture::ASTC_10x6, QRhiTexture::ASTC_10x8, QRhiTexture::ASTC_12x10, QRhiTexture::ASTC_12x12, QRhiTexture::ASTC_4x4, QRhiTexture::ASTC_5x4, QRhiTexture::ASTC_5x5, QRhiTexture::ASTC_6x5, QRhiTexture::ASTC_6x6, QRhiTexture::ASTC_8x5, QRhiTexture::ASTC_8x6, QRhiTexture::ASTC_8x8, QRhiTexture::BC1, QRhiTexture::BC2, QRhiTexture::BC3, QRhiTexture::BC4, QRhiTexture::BC5, QRhiTexture::BC6H, QRhiTexture::BC7, QRhiTexture::BGRA8, d, QRhiTexture::D16, QRhiTexture::D24, QRhiTexture::D24S8, QRhiTexture::D32F, QRhiTexture::ETC2_RGB8, QRhiTexture::ETC2_RGB8A1, QRhiTexture::ETC2_RGBA8, Q_UNUSED, qWarning, QRhiTexture::R16, QRhiTexture::R16F, QRhiTexture::R32F, QRhiTexture::R8, QRhiTexture::RED_OR_ALPHA8, QRhiTexture::RG16, QRhiTexture::RG8, QRhiTexture::RGB10A2, QRhiTexture::RGBA16F, QRhiTexture::RGBA32F, QRhiTexture::RGBA8, and QRhiTexture::sRGB.
Referenced by QMetalRenderBuffer::create(), and QMetalTexture::prepareCreate().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 4607 of file qrhimetal.mm.
References QRhiGraphicsPipeline::Fill, and QRhiGraphicsPipeline::Line.
Referenced by QMetalGraphicsPipeline::mapStates().
Here is the caller graph for this function:
|
inlinestatic |
Definition at line 1230 of file qrhimetal.mm.
References QMetalShaderResourceBindingsData::COMPUTE, QRhiShaderResourceBinding::ComputeStage, QMetalShaderResourceBindingsData::FRAGMENT, QRhiShaderResourceBinding::FragmentStage, QMetalShaderResourceBindingsData::TESSCTRL, QRhiShaderResourceBinding::TessellationControlStage, QRhiShaderResourceBinding::TessellationEvaluationStage, QMetalShaderResourceBindingsData::TESSEVAL, QMetalShaderResourceBindingsData::VERTEX, and QRhiShaderResourceBinding::VertexStage.
Referenced by QRhiMetal::enqueueShaderResourceBindings().
Here is the caller graph for this function: