rhi: Remove ugly fallthroughs
The coding style does not actually require this. Change-Id: I2be7cd29c4dabfed2822cd7fb63e597c071e5e15 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
parent
0a78e5f117
commit
2671fb2777
@ -630,9 +630,7 @@ void QRhiD3D11::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBind
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::ImageLoad:
|
case QRhiShaderResourceBinding::ImageLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageStore:
|
case QRhiShaderResourceBinding::ImageStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageLoadStore:
|
case QRhiShaderResourceBinding::ImageLoadStore:
|
||||||
{
|
{
|
||||||
QD3D11Texture *texD = QRHI_RES(QD3D11Texture, b->u.simage.tex);
|
QD3D11Texture *texD = QRHI_RES(QD3D11Texture, b->u.simage.tex);
|
||||||
@ -644,9 +642,7 @@ void QRhiD3D11::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBind
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::BufferLoad:
|
case QRhiShaderResourceBinding::BufferLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferStore:
|
case QRhiShaderResourceBinding::BufferStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferLoadStore:
|
case QRhiShaderResourceBinding::BufferLoadStore:
|
||||||
{
|
{
|
||||||
QD3D11Buffer *bufD = QRHI_RES(QD3D11Buffer, b->u.sbuf.buf);
|
QD3D11Buffer *bufD = QRHI_RES(QD3D11Buffer, b->u.sbuf.buf);
|
||||||
@ -1128,39 +1124,24 @@ static inline DXGI_FORMAT toD3DTextureFormat(QRhiTexture::Format format, QRhiTex
|
|||||||
return srgb ? DXGI_FORMAT_BC7_UNORM_SRGB : DXGI_FORMAT_BC7_UNORM;
|
return srgb ? DXGI_FORMAT_BC7_UNORM_SRGB : DXGI_FORMAT_BC7_UNORM;
|
||||||
|
|
||||||
case QRhiTexture::ETC2_RGB8:
|
case QRhiTexture::ETC2_RGB8:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ETC2_RGB8A1:
|
case QRhiTexture::ETC2_RGB8A1:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ETC2_RGBA8:
|
case QRhiTexture::ETC2_RGBA8:
|
||||||
qWarning("QRhiD3D11 does not support ETC2 textures");
|
qWarning("QRhiD3D11 does not support ETC2 textures");
|
||||||
return DXGI_FORMAT_R8G8B8A8_UNORM;
|
return DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||||
|
|
||||||
case QRhiTexture::ASTC_4x4:
|
case QRhiTexture::ASTC_4x4:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ASTC_5x4:
|
case QRhiTexture::ASTC_5x4:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ASTC_5x5:
|
case QRhiTexture::ASTC_5x5:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ASTC_6x5:
|
case QRhiTexture::ASTC_6x5:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ASTC_6x6:
|
case QRhiTexture::ASTC_6x6:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ASTC_8x5:
|
case QRhiTexture::ASTC_8x5:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ASTC_8x6:
|
case QRhiTexture::ASTC_8x6:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ASTC_8x8:
|
case QRhiTexture::ASTC_8x8:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ASTC_10x5:
|
case QRhiTexture::ASTC_10x5:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ASTC_10x6:
|
case QRhiTexture::ASTC_10x6:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ASTC_10x8:
|
case QRhiTexture::ASTC_10x8:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ASTC_10x10:
|
case QRhiTexture::ASTC_10x10:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ASTC_12x10:
|
case QRhiTexture::ASTC_12x10:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::ASTC_12x12:
|
case QRhiTexture::ASTC_12x12:
|
||||||
qWarning("QRhiD3D11 does not support ASTC textures");
|
qWarning("QRhiD3D11 does not support ASTC textures");
|
||||||
return DXGI_FORMAT_R8G8B8A8_UNORM;
|
return DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||||
@ -1201,7 +1182,6 @@ static inline bool isDepthTextureFormat(QRhiTexture::Format format)
|
|||||||
{
|
{
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case QRhiTexture::Format::D16:
|
case QRhiTexture::Format::D16:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::Format::D32F:
|
case QRhiTexture::Format::D32F:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -1867,9 +1847,7 @@ void QRhiD3D11::updateShaderResourceBindings(QD3D11ShaderResourceBindings *srbD)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::ImageLoad:
|
case QRhiShaderResourceBinding::ImageLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageStore:
|
case QRhiShaderResourceBinding::ImageStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageLoadStore:
|
case QRhiShaderResourceBinding::ImageLoadStore:
|
||||||
{
|
{
|
||||||
QD3D11Texture *texD = QRHI_RES(QD3D11Texture, b->u.simage.tex);
|
QD3D11Texture *texD = QRHI_RES(QD3D11Texture, b->u.simage.tex);
|
||||||
@ -1885,9 +1863,7 @@ void QRhiD3D11::updateShaderResourceBindings(QD3D11ShaderResourceBindings *srbD)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::BufferLoad:
|
case QRhiShaderResourceBinding::BufferLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferStore:
|
case QRhiShaderResourceBinding::BufferStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferLoadStore:
|
case QRhiShaderResourceBinding::BufferLoadStore:
|
||||||
{
|
{
|
||||||
QD3D11Buffer *bufD = QRHI_RES(QD3D11Buffer, b->u.sbuf.buf);
|
QD3D11Buffer *bufD = QRHI_RES(QD3D11Buffer, b->u.sbuf.buf);
|
||||||
@ -3356,11 +3332,9 @@ static inline D3D11_BLEND toD3DBlendFactor(QRhiGraphicsPipeline::BlendFactor f)
|
|||||||
case QRhiGraphicsPipeline::OneMinusDstAlpha:
|
case QRhiGraphicsPipeline::OneMinusDstAlpha:
|
||||||
return D3D11_BLEND_INV_DEST_ALPHA;
|
return D3D11_BLEND_INV_DEST_ALPHA;
|
||||||
case QRhiGraphicsPipeline::ConstantColor:
|
case QRhiGraphicsPipeline::ConstantColor:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiGraphicsPipeline::ConstantAlpha:
|
case QRhiGraphicsPipeline::ConstantAlpha:
|
||||||
return D3D11_BLEND_BLEND_FACTOR;
|
return D3D11_BLEND_BLEND_FACTOR;
|
||||||
case QRhiGraphicsPipeline::OneMinusConstantColor:
|
case QRhiGraphicsPipeline::OneMinusConstantColor:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiGraphicsPipeline::OneMinusConstantAlpha:
|
case QRhiGraphicsPipeline::OneMinusConstantAlpha:
|
||||||
return D3D11_BLEND_INV_BLEND_FACTOR;
|
return D3D11_BLEND_INV_BLEND_FACTOR;
|
||||||
case QRhiGraphicsPipeline::SrcAlphaSaturate:
|
case QRhiGraphicsPipeline::SrcAlphaSaturate:
|
||||||
|
@ -681,7 +681,6 @@ bool QRhiGles2::isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture
|
|||||||
|
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case QRhiTexture::D16:
|
case QRhiTexture::D16:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::D32F:
|
case QRhiTexture::D32F:
|
||||||
return caps.depthTexture;
|
return caps.depthTexture;
|
||||||
|
|
||||||
@ -695,7 +694,6 @@ bool QRhiGles2::isTextureFormatSupported(QRhiTexture::Format format, QRhiTexture
|
|||||||
return caps.r16Format;
|
return caps.r16Format;
|
||||||
|
|
||||||
case QRhiTexture::RGBA16F:
|
case QRhiTexture::RGBA16F:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::RGBA32F:
|
case QRhiTexture::RGBA32F:
|
||||||
return caps.floatFormats;
|
return caps.floatFormats;
|
||||||
|
|
||||||
@ -899,9 +897,7 @@ void QRhiGles2::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBind
|
|||||||
QRhiPassResourceTracker::toPassTrackerTextureStage(b->stage));
|
QRhiPassResourceTracker::toPassTrackerTextureStage(b->stage));
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::ImageLoad:
|
case QRhiShaderResourceBinding::ImageLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageStore:
|
case QRhiShaderResourceBinding::ImageStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageLoadStore:
|
case QRhiShaderResourceBinding::ImageLoadStore:
|
||||||
{
|
{
|
||||||
QGles2Texture *texD = QRHI_RES(QGles2Texture, b->u.simage.tex);
|
QGles2Texture *texD = QRHI_RES(QGles2Texture, b->u.simage.tex);
|
||||||
@ -917,9 +913,7 @@ void QRhiGles2::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBind
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::BufferLoad:
|
case QRhiShaderResourceBinding::BufferLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferStore:
|
case QRhiShaderResourceBinding::BufferStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferLoadStore:
|
case QRhiShaderResourceBinding::BufferLoadStore:
|
||||||
{
|
{
|
||||||
QGles2Buffer *bufD = QRHI_RES(QGles2Buffer, b->u.sbuf.buf);
|
QGles2Buffer *bufD = QRHI_RES(QGles2Buffer, b->u.sbuf.buf);
|
||||||
@ -1654,11 +1648,8 @@ static inline GLenum toGlBlendFactor(QRhiGraphicsPipeline::BlendFactor f)
|
|||||||
case QRhiGraphicsPipeline::SrcAlphaSaturate:
|
case QRhiGraphicsPipeline::SrcAlphaSaturate:
|
||||||
return GL_SRC_ALPHA_SATURATE;
|
return GL_SRC_ALPHA_SATURATE;
|
||||||
case QRhiGraphicsPipeline::Src1Color:
|
case QRhiGraphicsPipeline::Src1Color:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiGraphicsPipeline::OneMinusSrc1Color:
|
case QRhiGraphicsPipeline::OneMinusSrc1Color:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiGraphicsPipeline::Src1Alpha:
|
case QRhiGraphicsPipeline::Src1Alpha:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiGraphicsPipeline::OneMinusSrc1Alpha:
|
case QRhiGraphicsPipeline::OneMinusSrc1Alpha:
|
||||||
qWarning("Unsupported blend factor %d", f);
|
qWarning("Unsupported blend factor %d", f);
|
||||||
return GL_ZERO;
|
return GL_ZERO;
|
||||||
@ -2573,9 +2564,7 @@ void QRhiGles2::bindShaderResources(QRhiGraphicsPipeline *maybeGraphicsPs, QRhiC
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::ImageLoad:
|
case QRhiShaderResourceBinding::ImageLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageStore:
|
case QRhiShaderResourceBinding::ImageStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageLoadStore:
|
case QRhiShaderResourceBinding::ImageLoadStore:
|
||||||
{
|
{
|
||||||
QGles2Texture *texD = QRHI_RES(QGles2Texture, b->u.simage.tex);
|
QGles2Texture *texD = QRHI_RES(QGles2Texture, b->u.simage.tex);
|
||||||
@ -2591,9 +2580,7 @@ void QRhiGles2::bindShaderResources(QRhiGraphicsPipeline *maybeGraphicsPs, QRhiC
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::BufferLoad:
|
case QRhiShaderResourceBinding::BufferLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferStore:
|
case QRhiShaderResourceBinding::BufferStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferLoadStore:
|
case QRhiShaderResourceBinding::BufferLoadStore:
|
||||||
{
|
{
|
||||||
QGles2Buffer *bufD = QRHI_RES(QGles2Buffer, b->u.sbuf.buf);
|
QGles2Buffer *bufD = QRHI_RES(QGles2Buffer, b->u.sbuf.buf);
|
||||||
|
@ -761,9 +761,7 @@ void QRhiMetal::enqueueShaderResourceBindings(QMetalShaderResourceBindings *srbD
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::ImageLoad:
|
case QRhiShaderResourceBinding::ImageLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageStore:
|
case QRhiShaderResourceBinding::ImageStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageLoadStore:
|
case QRhiShaderResourceBinding::ImageLoadStore:
|
||||||
{
|
{
|
||||||
QMetalTexture *texD = QRHI_RES(QMetalTexture, b->u.simage.tex);
|
QMetalTexture *texD = QRHI_RES(QMetalTexture, b->u.simage.tex);
|
||||||
@ -786,9 +784,7 @@ void QRhiMetal::enqueueShaderResourceBindings(QMetalShaderResourceBindings *srbD
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::BufferLoad:
|
case QRhiShaderResourceBinding::BufferLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferStore:
|
case QRhiShaderResourceBinding::BufferStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferLoadStore:
|
case QRhiShaderResourceBinding::BufferLoadStore:
|
||||||
{
|
{
|
||||||
QMetalBuffer *bufD = QRHI_RES(QMetalBuffer, b->u.sbuf.buf);
|
QMetalBuffer *bufD = QRHI_RES(QMetalBuffer, b->u.sbuf.buf);
|
||||||
@ -996,9 +992,7 @@ void QRhiMetal::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBind
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::ImageLoad:
|
case QRhiShaderResourceBinding::ImageLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageStore:
|
case QRhiShaderResourceBinding::ImageStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageLoadStore:
|
case QRhiShaderResourceBinding::ImageLoadStore:
|
||||||
{
|
{
|
||||||
QMetalTexture *texD = QRHI_RES(QMetalTexture, b->u.simage.tex);
|
QMetalTexture *texD = QRHI_RES(QMetalTexture, b->u.simage.tex);
|
||||||
@ -1011,9 +1005,7 @@ void QRhiMetal::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBind
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::BufferLoad:
|
case QRhiShaderResourceBinding::BufferLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferStore:
|
case QRhiShaderResourceBinding::BufferStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferLoadStore:
|
case QRhiShaderResourceBinding::BufferLoadStore:
|
||||||
{
|
{
|
||||||
QMetalBuffer *bufD = QRHI_RES(QMetalBuffer, b->u.sbuf.buf);
|
QMetalBuffer *bufD = QRHI_RES(QMetalBuffer, b->u.sbuf.buf);
|
||||||
@ -2928,9 +2920,7 @@ bool QMetalShaderResourceBindings::build()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::ImageLoad:
|
case QRhiShaderResourceBinding::ImageLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageStore:
|
case QRhiShaderResourceBinding::ImageStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageLoadStore:
|
case QRhiShaderResourceBinding::ImageLoadStore:
|
||||||
{
|
{
|
||||||
QMetalTexture *texD = QRHI_RES(QMetalTexture, b->u.simage.tex);
|
QMetalTexture *texD = QRHI_RES(QMetalTexture, b->u.simage.tex);
|
||||||
@ -2939,9 +2929,7 @@ bool QMetalShaderResourceBindings::build()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::BufferLoad:
|
case QRhiShaderResourceBinding::BufferLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferStore:
|
case QRhiShaderResourceBinding::BufferStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferLoadStore:
|
case QRhiShaderResourceBinding::BufferLoadStore:
|
||||||
{
|
{
|
||||||
QMetalBuffer *bufD = QRHI_RES(QMetalBuffer, b->u.sbuf.buf);
|
QMetalBuffer *bufD = QRHI_RES(QMetalBuffer, b->u.sbuf.buf);
|
||||||
|
@ -864,7 +864,6 @@ static inline bool isDepthTextureFormat(QRhiTexture::Format format)
|
|||||||
{
|
{
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case QRhiTexture::Format::D16:
|
case QRhiTexture::Format::D16:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiTexture::Format::D32F:
|
case QRhiTexture::Format::D32F:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -2373,9 +2372,7 @@ void QRhiVulkan::updateShaderResourceBindings(QRhiShaderResourceBindings *srb, i
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::ImageLoad:
|
case QRhiShaderResourceBinding::ImageLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageStore:
|
case QRhiShaderResourceBinding::ImageStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageLoadStore:
|
case QRhiShaderResourceBinding::ImageLoadStore:
|
||||||
{
|
{
|
||||||
QVkTexture *texD = QRHI_RES(QVkTexture, b->u.simage.tex);
|
QVkTexture *texD = QRHI_RES(QVkTexture, b->u.simage.tex);
|
||||||
@ -2394,9 +2391,7 @@ void QRhiVulkan::updateShaderResourceBindings(QRhiShaderResourceBindings *srb, i
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::BufferLoad:
|
case QRhiShaderResourceBinding::BufferLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferStore:
|
case QRhiShaderResourceBinding::BufferStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferLoadStore:
|
case QRhiShaderResourceBinding::BufferLoadStore:
|
||||||
{
|
{
|
||||||
QVkBuffer *bufD = QRHI_RES(QVkBuffer, b->u.sbuf.buf);
|
QVkBuffer *bufD = QRHI_RES(QVkBuffer, b->u.sbuf.buf);
|
||||||
@ -3564,9 +3559,7 @@ static inline VkImageLayout toVkLayout(QRhiPassResourceTracker::TextureAccess ac
|
|||||||
case QRhiPassResourceTracker::TexDepthOutput:
|
case QRhiPassResourceTracker::TexDepthOutput:
|
||||||
return VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
return VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
||||||
case QRhiPassResourceTracker::TexStorageLoad:
|
case QRhiPassResourceTracker::TexStorageLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiPassResourceTracker::TexStorageStore:
|
case QRhiPassResourceTracker::TexStorageStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiPassResourceTracker::TexStorageLoadStore:
|
case QRhiPassResourceTracker::TexStorageLoadStore:
|
||||||
return VK_IMAGE_LAYOUT_GENERAL;
|
return VK_IMAGE_LAYOUT_GENERAL;
|
||||||
default:
|
default:
|
||||||
@ -4045,9 +4038,7 @@ void QRhiVulkan::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBin
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::ImageLoad:
|
case QRhiShaderResourceBinding::ImageLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageStore:
|
case QRhiShaderResourceBinding::ImageStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageLoadStore:
|
case QRhiShaderResourceBinding::ImageLoadStore:
|
||||||
{
|
{
|
||||||
QVkTexture *texD = QRHI_RES(QVkTexture, b->u.simage.tex);
|
QVkTexture *texD = QRHI_RES(QVkTexture, b->u.simage.tex);
|
||||||
@ -4072,9 +4063,7 @@ void QRhiVulkan::setShaderResources(QRhiCommandBuffer *cb, QRhiShaderResourceBin
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QRhiShaderResourceBinding::BufferLoad:
|
case QRhiShaderResourceBinding::BufferLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferStore:
|
case QRhiShaderResourceBinding::BufferStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferLoadStore:
|
case QRhiShaderResourceBinding::BufferLoadStore:
|
||||||
{
|
{
|
||||||
QVkBuffer *bufD = QRHI_RES(QVkBuffer, b->u.sbuf.buf);
|
QVkBuffer *bufD = QRHI_RES(QVkBuffer, b->u.sbuf.buf);
|
||||||
@ -4863,16 +4852,12 @@ static inline VkDescriptorType toVkDescriptorType(const QRhiShaderResourceBindin
|
|||||||
return VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
|
return VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
|
||||||
|
|
||||||
case QRhiShaderResourceBinding::ImageLoad:
|
case QRhiShaderResourceBinding::ImageLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageStore:
|
case QRhiShaderResourceBinding::ImageStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::ImageLoadStore:
|
case QRhiShaderResourceBinding::ImageLoadStore:
|
||||||
return VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
|
return VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;
|
||||||
|
|
||||||
case QRhiShaderResourceBinding::BufferLoad:
|
case QRhiShaderResourceBinding::BufferLoad:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferStore:
|
case QRhiShaderResourceBinding::BufferStore:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case QRhiShaderResourceBinding::BufferLoadStore:
|
case QRhiShaderResourceBinding::BufferLoadStore:
|
||||||
return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
|
return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
|
||||||
|
|
||||||
@ -6356,17 +6341,11 @@ static inline bool isSrgbFormat(VkFormat format)
|
|||||||
{
|
{
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case VK_FORMAT_R8_SRGB:
|
case VK_FORMAT_R8_SRGB:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case VK_FORMAT_R8G8_SRGB:
|
case VK_FORMAT_R8G8_SRGB:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case VK_FORMAT_R8G8B8_SRGB:
|
case VK_FORMAT_R8G8B8_SRGB:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case VK_FORMAT_B8G8R8_SRGB:
|
case VK_FORMAT_B8G8R8_SRGB:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case VK_FORMAT_R8G8B8A8_SRGB:
|
case VK_FORMAT_R8G8B8A8_SRGB:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case VK_FORMAT_B8G8R8A8_SRGB:
|
case VK_FORMAT_B8G8R8A8_SRGB:
|
||||||
Q_FALLTHROUGH();
|
|
||||||
case VK_FORMAT_A8B8G8R8_SRGB_PACK32:
|
case VK_FORMAT_A8B8G8R8_SRGB_PACK32:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user