mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-23 04:00:05 +00:00
Instrumentation: Add ArrayStride decoration to debug output buffer array (#2290)
This commit is contained in:
parent
cb27ffdcd8
commit
83bfdc976a
@ -309,6 +309,8 @@ uint32_t InstrumentPass::GetOutputBufferId() {
|
||||
analysis::RuntimeArray uint_rarr_ty(reg_uint_ty);
|
||||
analysis::Type* reg_uint_rarr_ty =
|
||||
type_mgr->GetRegisteredType(&uint_rarr_ty);
|
||||
uint32_t uint_arr_ty_id = type_mgr->GetTypeInstruction(reg_uint_rarr_ty);
|
||||
deco_mgr->AddDecorationVal(uint_arr_ty_id, SpvDecorationArrayStride, 4u);
|
||||
analysis::Struct obuf_ty({reg_uint_ty, reg_uint_rarr_ty});
|
||||
analysis::Type* reg_obuf_ty = type_mgr->GetRegisteredType(&obuf_ty);
|
||||
uint32_t obufTyId = type_mgr->GetTypeInstruction(reg_obuf_ty);
|
||||
|
@ -92,7 +92,8 @@ OpDecorate %_entryPointOutput_vColor Location 0
|
||||
)";
|
||||
|
||||
const std::string new_annots =
|
||||
R"(OpDecorate %_struct_55 Block
|
||||
R"(OpDecorate %_runtimearr_uint ArrayStride 4
|
||||
OpDecorate %_struct_55 Block
|
||||
OpMemberDecorate %_struct_55 0 Offset 0
|
||||
OpMemberDecorate %_struct_55 1 Offset 4
|
||||
OpDecorate %57 DescriptorSet 7
|
||||
@ -441,6 +442,7 @@ OpDecorate %PerViewConstantBuffer_t Block
|
||||
OpDecorate %g_sAniso DescriptorSet 0
|
||||
OpDecorate %i_vTextureCoords Location 0
|
||||
OpDecorate %_entryPointOutput_vColor Location 0
|
||||
OpDecorate %_runtimearr_uint ArrayStride 4
|
||||
OpDecorate %_struct_63 Block
|
||||
OpMemberDecorate %_struct_63 0 Offset 0
|
||||
OpMemberDecorate %_struct_63 1 Offset 4
|
||||
@ -735,6 +737,7 @@ OpDecorate %_entryPointOutput_vColor Location 0
|
||||
OpDecorate %10 DescriptorSet 7
|
||||
OpDecorate %10 Binding 0
|
||||
OpDecorate %gl_FragCoord BuiltIn FragCoord
|
||||
OpDecorate %_runtimearr_uint ArrayStride 4
|
||||
OpDecorate %_struct_34 Block
|
||||
OpMemberDecorate %_struct_34 0 Offset 0
|
||||
OpMemberDecorate %_struct_34 1 Offset 4
|
||||
@ -968,6 +971,7 @@ OpMemberDecorate %PerViewConstantBuffer_t 0 Offset 0
|
||||
OpDecorate %PerViewConstantBuffer_t Block
|
||||
OpDecorate %i_vTextureCoords Location 0
|
||||
OpDecorate %_entryPointOutput_vColor Location 0
|
||||
OpDecorate %_runtimearr_uint ArrayStride 4
|
||||
OpDecorate %_struct_51 Block
|
||||
OpMemberDecorate %_struct_51 0 Offset 0
|
||||
OpMemberDecorate %_struct_51 1 Offset 4
|
||||
@ -1193,6 +1197,7 @@ OpMemberDecorate %PerViewConstantBuffer_t 0 Offset 0
|
||||
OpDecorate %PerViewConstantBuffer_t Block
|
||||
OpDecorate %i_vTextureCoords Location 0
|
||||
OpDecorate %_entryPointOutput_vColor Location 0
|
||||
OpDecorate %_runtimearr_uint ArrayStride 4
|
||||
OpDecorate %_struct_49 Block
|
||||
OpMemberDecorate %_struct_49 0 Offset 0
|
||||
OpMemberDecorate %_struct_49 1 Offset 4
|
||||
@ -1418,6 +1423,7 @@ OpMemberDecorate %PerViewConstantBuffer_t 0 Offset 0
|
||||
OpDecorate %PerViewConstantBuffer_t Block
|
||||
OpDecorate %i_vTextureCoords Location 0
|
||||
OpDecorate %_entryPointOutput_vColor Location 0
|
||||
OpDecorate %_runtimearr_uint ArrayStride 4
|
||||
OpDecorate %_struct_48 Block
|
||||
OpMemberDecorate %_struct_48 0 Offset 0
|
||||
OpMemberDecorate %_struct_48 1 Offset 4
|
||||
@ -1672,6 +1678,7 @@ OpDecorate %foo Block
|
||||
OpDecorate %__0 DescriptorSet 0
|
||||
OpDecorate %__0 Binding 5
|
||||
OpDecorate %coords2D Location 0
|
||||
OpDecorate %_runtimearr_uint ArrayStride 4
|
||||
OpDecorate %_struct_61 Block
|
||||
OpMemberDecorate %_struct_61 0 Offset 0
|
||||
OpMemberDecorate %_struct_61 1 Offset 4
|
||||
|
Loading…
Reference in New Issue
Block a user