From 7c3779006d8d296b18fbf78fa9e767ceac05081f Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Sat, 21 Oct 2023 20:48:22 +0200 Subject: [PATCH] tst_qrhi: Exercise a readonly storage buffer in the simple test ...not only in the tessellation-related ones (that are skipped with D3D). The checked-in .qsb file is generated with a patched shadertools that fixes a bug regarding readonly storage buffers and HLSL. Change-Id: Iafbad4e81875d7b4f877435b9b1e6078019d52ac Reviewed-by: Laszlo Agocs --- .../auto/gui/rhi/qrhi/data/storagebuffer.comp | 2 +- .../gui/rhi/qrhi/data/storagebuffer.comp.qsb | Bin 1239 -> 1262 bytes tests/auto/gui/rhi/qrhi/tst_qrhi.cpp | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/gui/rhi/qrhi/data/storagebuffer.comp b/tests/auto/gui/rhi/qrhi/data/storagebuffer.comp index fd6cabebc5f..ffa0bc70041 100644 --- a/tests/auto/gui/rhi/qrhi/data/storagebuffer.comp +++ b/tests/auto/gui/rhi/qrhi/data/storagebuffer.comp @@ -2,7 +2,7 @@ layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in; -layout (binding = 0, std430) buffer toGpu +layout (binding = 0, std430) readonly buffer toGpu { float _float; vec2 _vec2; diff --git a/tests/auto/gui/rhi/qrhi/data/storagebuffer.comp.qsb b/tests/auto/gui/rhi/qrhi/data/storagebuffer.comp.qsb index 77887ed941fc54790b6eabe587a10c1ddddc965a..b02f541cc5d93f118ef5b689a0e3139b56d50b89 100644 GIT binary patch literal 1262 zcmV`BKqE`QH!aXcTcUlUX{dFgp|@V%ajgeAaW!^>ewE7v+{wIkU>5%rdG4#|!f+71pH! z_RvUAfRlromGa>Vt3RSFETA>Yj14{#%ksB-ae2{*Vy9t!E33C5(@{=0$?OuM9^0NT zWaP_It`!3OftVV69O5^{O2AfgSQ*$>4yyp;3Ux_Ju`YS!;vT?mD(_ExSH(8=p1@uz zXR#xQv&UCDbQz>wYv8Ncvx>JaK2eGHJDf=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!q|kb*{2i7+%dnOhC*D#GHj# zfLIfVMUc0eHq-TA#AFnHn{=Iu^MA|#i!CqWy-i#GYZTkDH_!)xAH{k?VVe5wsQ)qu zUw6YGxx1pC60O`YTFHs7Ch=-NzI^@=yU!dabff6Gsw%~zf3Jt`trx{^Xe3PnF2uE) zQ@B<=E#M#+-}UFJcohesYfu+C5QC>3$x6ypF9X{#nspwXX_L0`RN1r*`I)t%{Y7S! z>e&gBmY-QW1}rkP4705aEkk~04H*DKYRt8tjN@0KYdeuacZ2`xy#)s;R}{9(^|LId z{(&y;9eMs>lsK;b!`O}aQpV26ySdOZedLXuQ~oqwU1(Yo@eT3qu^Zjl16P+;)Ql(& zlR>=veo{rJuP2|LsoO~<$S!Bby8QCV<<#|)nyCvYHQ5y;YI%Zf|DA{U`g&|X+_?S3 zPa@ap^>U}058rDy^xcs@seRLM+0z21oqh)m~L9_k5z8rl1I z?*O0E<<9^|z5Es6qc{HutjNUh3e3C&QkGA`-!#&H1+bnuWlOOF@~n*<{{RfLlisld BcIE&8 diff --git a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp index 1ab6153bb55..e98ed9e06e9 100644 --- a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp +++ b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp @@ -6348,7 +6348,7 @@ void tst_QRhi::storageBuffer() u->uploadStaticBuffer(fromGpuBuffer.data(), 0, blocks["fromGpu"].knownSize, QByteArray(blocks["fromGpu"].knownSize, 0).constData()); QScopedPointer srb(rhi->newShaderResourceBindings()); - srb->setBindings({QRhiShaderResourceBinding::bufferLoadStore(blocks["toGpu"].binding, QRhiShaderResourceBinding::ComputeStage, toGpuBuffer.data()), + srb->setBindings({QRhiShaderResourceBinding::bufferLoad(blocks["toGpu"].binding, QRhiShaderResourceBinding::ComputeStage, toGpuBuffer.data()), QRhiShaderResourceBinding::bufferLoadStore(blocks["fromGpu"].binding, QRhiShaderResourceBinding::ComputeStage, fromGpuBuffer.data())}); QVERIFY(srb->create());