Skip to content

Commit 04feca3

Browse files
ConvertUBOToPushConstantPass: add descriptive failure messages
1 parent 3d75fa7 commit 04feca3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Graphics/ShaderTools/src/ConvertUBOToPushConstant.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ class ConvertUBOToPushConstantPass : public spvtools::opt::Pass
200200
spvtools::opt::Instruction* ptr_type_inst = get_def_use_mgr()->GetDef(target_var->type_id());
201201
if (ptr_type_inst == nullptr || ptr_type_inst->opcode() != spv::Op::OpTypePointer)
202202
{
203+
LOG_ERROR_MESSAGE("Failed to convert UBO block '", m_BlockName, "': target variable has unexpected type.");
203204
return Status::Failure;
204205
}
205206

@@ -214,6 +215,7 @@ class ConvertUBOToPushConstantPass : public spvtools::opt::Pass
214215
if (new_ptr_type_id == 0)
215216
{
216217
// Failed to create new pointer type
218+
LOG_ERROR_MESSAGE("Failed to convert UBO block '", m_BlockName, "': could not create PushConstant pointer type.");
217219
return Status::Failure;
218220
}
219221

0 commit comments

Comments
 (0)