@@ -109,10 +109,9 @@ bool validateResults(video::IVideoDriver* driver, const uint32_t workgroupSize,
109
109
for (uint32_t localInvocationIndex=0u ; localInvocationIndex<workgroupSize; localInvocationIndex++)
110
110
if (tmp[localInvocationIndex]!=dataFromBuffer[workgroupOffset+localInvocationIndex])
111
111
{
112
- auto correctRes = dataFromBuffer[workgroupOffset + localInvocationIndex];
113
112
os::Printer::log (" Failed test #" + std::to_string (workgroupSize) + " (" + Arithmetic::name + " )" , ELL_ERROR);
114
113
success = false ;
115
- // break;
114
+ break ;
116
115
}
117
116
}
118
117
delete[] tmp;
@@ -127,7 +126,7 @@ bool validateResults(video::IVideoDriver* driver, const uint32_t workgroupSize,
127
126
template <class Arithmetic >
128
127
bool runTest (video::IVideoDriver* driver, video::IGPUComputePipeline* pipeline, const video::IGPUDescriptorSet* ds, const uint32_t workgroupSize, core::smart_refctd_ptr<IGPUBuffer> buffer)
129
128
{
130
- if (pipeline == nullptr ) assert ( false ) ; // com
129
+ if (pipeline == nullptr ) return false ; // code could not be compiled
131
130
driver->bindComputePipeline (pipeline);
132
131
driver->bindDescriptorSets (video::EPBP_COMPUTE,pipeline->getLayout (),0u ,1u ,&ds,nullptr );
133
132
const uint32_t workgroupCount = BUFFER_DWORD_COUNT/workgroupSize;
@@ -201,12 +200,11 @@ int main()
201
200
};
202
201
constexpr auto kTestTypeCount = sizeof (shaderGLSL)/sizeof (GLSLCodeWithWorkgroup);
203
202
204
-
205
203
auto getGPUShader = [&](GLSLCodeWithWorkgroup glsl, uint32_t wg_count)
206
204
{
207
205
auto alteredGLSL = glsl.glsl .replace (glsl.workgroup_definition_position , 4 , std::to_string (wg_count));
208
206
auto shaderUnspecialized = core::make_smart_refctd_ptr<asset::ICPUShader>(alteredGLSL.data ());
209
- asset::ISpecializedShader::SInfo specinfo (nullptr , nullptr , " main" , IGPUSpecializedShader::ESS_COMPUTE," ../file.comp" );
207
+ asset::ISpecializedShader::SInfo specinfo (nullptr , nullptr , " main" , IGPUSpecializedShader::ESS_COMPUTE, " ../file.comp" );
210
208
auto cs = core::make_smart_refctd_ptr<asset::ICPUSpecializedShader>(std::move (shaderUnspecialized), std::move (specinfo));
211
209
auto cs_rawptr = cs.get ();
212
210
core::smart_refctd_ptr<IGPUSpecializedShader> shader = driver->getGPUObjectsFromAssets (&cs_rawptr, &cs_rawptr + 1 )->front ();
0 commit comments