@@ -117,10 +117,10 @@ class DeviceSelectionAndSharedSourcesApp final : public application_templates::M
117
117
// testing pre-defined layout compatibility
118
118
{
119
119
constexpr std::array mergeTestShadersPaths = {
120
- " app_resources/pplnLayoutCreationWithPredefinedLayoutTest/shader_0.comp.hlsl"
121
- // "app_resources/pplnLayoutCreationWithPredefinedLayoutTest/shader_1.comp.hlsl",
122
- // "app_resources/pplnLayoutCreationWithPredefinedLayoutTest/shader_2.comp.hlsl",
123
- // "app_resources/pplnLayoutCreationWithPredefinedLayoutTest/shader_3.comp.hlsl"
120
+ " app_resources/pplnLayoutCreationWithPredefinedLayoutTest/shader_0.comp.hlsl" ,
121
+ " app_resources/pplnLayoutCreationWithPredefinedLayoutTest/shader_1.comp.hlsl" ,
122
+ " app_resources/pplnLayoutCreationWithPredefinedLayoutTest/shader_2.comp.hlsl" ,
123
+ " app_resources/pplnLayoutCreationWithPredefinedLayoutTest/shader_3.comp.hlsl"
124
124
};
125
125
constexpr uint32_t MERGE_TEST_SHADERS_CNT = mergeTestShadersPaths.size ();
126
126
@@ -129,13 +129,13 @@ class DeviceSelectionAndSharedSourcesApp final : public application_templates::M
129
129
130
130
for (uint32_t i = 0u ; i < MERGE_TEST_SHADERS_CNT; ++i)
131
131
{
132
- m_logger->log (" ------- %s INTROSPECTION -------" , ILogger::E_LOG_LEVEL::ELL_WARNING, mergeTestShadersPaths[i]);
132
+ m_logger->log (" ------- LOADING %s -------" , ILogger::E_LOG_LEVEL::ELL_WARNING, mergeTestShadersPaths[i]);
133
133
auto sourceIntrospectionPair = this ->compileShaderAndTestIntrospection (mergeTestShadersPaths[i], introspector[i]);
134
134
// TODO: disctinct functions for shader compilation and introspection
135
135
sources[i] = sourceIntrospectionPair.first ;
136
136
}
137
137
138
- constexpr uint32_t BINDINGS_DS_0_CNT = 2u ;
138
+ constexpr uint32_t BINDINGS_DS_0_CNT = 1u ;
139
139
const ICPUDescriptorSetLayout::SBinding bindingsDS0[BINDINGS_DS_0_CNT] = {
140
140
{
141
141
.binding = 0 ,
@@ -144,14 +144,6 @@ class DeviceSelectionAndSharedSourcesApp final : public application_templates::M
144
144
.stageFlags = ICPUShader::ESS_COMPUTE,
145
145
.count = 1 ,
146
146
.samplers = nullptr
147
- },
148
- {
149
- .binding = 1 ,
150
- .type = nbl::asset::IDescriptor::E_TYPE::ET_STORAGE_BUFFER,
151
- .createFlags = ICPUDescriptorSetLayout::SBinding::E_CREATE_FLAGS::ECF_NONE,
152
- .stageFlags = IGPUShader::ESS_COMPUTE,
153
- .count = 3 ,
154
- .samplers = nullptr
155
147
}
156
148
};
157
149
@@ -170,7 +162,7 @@ class DeviceSelectionAndSharedSourcesApp final : public application_templates::M
170
162
.type = nbl::asset::IDescriptor::E_TYPE::ET_STORAGE_BUFFER,
171
163
.createFlags = ICPUDescriptorSetLayout::SBinding::E_CREATE_FLAGS::ECF_NONE,
172
164
.stageFlags = ICPUShader::ESS_COMPUTE,
173
- .count = 5 ,
165
+ .count = 2 ,
174
166
.samplers = nullptr
175
167
}
176
168
};
@@ -194,16 +186,15 @@ class DeviceSelectionAndSharedSourcesApp final : public application_templates::M
194
186
pplnCreationSuccess[i] = static_cast <bool >(introspector[i].createApproximateComputePipelineFromIntrospection (specInfo, core::smart_refctd_ptr<ICPUPipelineLayout>(predefinedPplnLayout)));
195
187
}
196
188
197
- // assert(MERGE_TEST_SHADERS_CNT <= 4u);
198
189
// DESCRIPTOR VALIDATION TESTS
199
190
// layout from introspection is a subset of pre-defined layout, hence ppln creation should SUCCEED
200
191
confirmExpectedOutput (pplnCreationSuccess[0 ], true );
201
192
// layout from introspection is NOT a subset (too many bindings in descriptor set 0) of pre-defined layout, hence ppln creation should FAIL
202
- // confirmExpectedOutput(pplnCreationSuccess[1], false);
193
+ confirmExpectedOutput (pplnCreationSuccess[1 ], false );
203
194
// layout from introspection is NOT a subset (pre-defined layout doesn't have descriptor set 2) of pre-defined layout, hence ppln creation should FAIL
204
- // confirmExpectedOutput(pplnCreationSuccess[2], false);
195
+ confirmExpectedOutput (pplnCreationSuccess[2 ], false );
205
196
// layout from introspection is NOT a subset (same bindings, different type of one of the bindings) of pre-defined layout, hence ppln creation should FAIL
206
- // confirmExpectedOutput(pplnCreationSuccess[3], false);
197
+ confirmExpectedOutput (pplnCreationSuccess[3 ], false );
207
198
// PUSH CONSTANTS VALIDATION TESTS
208
199
// layout from introspection is a subset of pre-defined layout (Push constant size declared in shader are compatible), hence ppln creation should SUCCEED
209
200
// TODO
@@ -216,7 +207,7 @@ class DeviceSelectionAndSharedSourcesApp final : public application_templates::M
216
207
auto mainShader = this ->compileShaderAndTestIntrospection (" app_resources/shader.comp.hlsl" , introspector);
217
208
auto source = mainShader.first ;
218
209
auto mainShaderIntrospection = mainShader.second ;
219
- mainShaderIntrospection->debugPrint (m_logger.get ());
210
+ // mainShaderIntrospection->debugPrint(m_logger.get());
220
211
// auto source2 = this->compileShaderAndTestIntrospection("app_resources/shader.comp.hlsl", introspector); // to make sure caching works
221
212
222
213
0 commit comments