Skip to content

Commit d0a0245

Browse files
author
kevyuu
committed
Check shader availability in getRequiredSubgroupStages
1 parent 165eebc commit d0a0245

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/nbl/video/IGPUComputePipeline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class IGPUComputePipeline : public IGPUPipeline<asset::IComputePipeline<const IG
6464

6565
inline core::bitflag<hlsl::ShaderStage> getRequiredSubgroupStages() const
6666
{
67-
if (shader.requiredSubgroupSize >= asset::IPipelineBase::SUBGROUP_SIZE::REQUIRE_4)
67+
if (shader.shader && shader.requiredSubgroupSize >= asset::IPipelineBase::SUBGROUP_SIZE::REQUIRE_4)
6868
{
6969
return hlsl::ESS_COMPUTE;
7070
}

include/nbl/video/IGPUGraphicsPipeline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class IGPUGraphicsPipeline : public IGPUPipeline<asset::IGraphicsPipeline<const
7272
core::bitflag<hlsl::ShaderStage> stages;
7373
auto processSpecInfo = [&](const SShaderSpecInfo& spec, hlsl::ShaderStage stage)
7474
{
75-
if (spec.requiredSubgroupSize >= SUBGROUP_SIZE::REQUIRE_4) {
75+
if (spec.shader && spec.requiredSubgroupSize >= SUBGROUP_SIZE::REQUIRE_4) {
7676
stages |= stage;
7777
}
7878
};

include/nbl/video/IGPURayTracingPipeline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class IGPURayTracingPipeline : public IGPUPipeline<asset::IRayTracingPipeline<c
149149
core::bitflag<hlsl::ShaderStage> stages;
150150
auto processSpecInfo = [&](const SShaderSpecInfo& spec, hlsl::ShaderStage stage)
151151
{
152-
if (spec.requiredSubgroupSize >= SUBGROUP_SIZE::REQUIRE_4) {
152+
if (spec.shader && spec.requiredSubgroupSize >= SUBGROUP_SIZE::REQUIRE_4) {
153153
stages |= stage;
154154
}
155155
};

0 commit comments

Comments
 (0)