Skip to content

Commit

Permalink
Use inbounds access chain for SRV/UAV BDA as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKristian-Work committed May 31, 2022
1 parent d5f8f74 commit e08570f
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 29 deletions.
6 changes: 4 additions & 2 deletions opcodes/dxil/dxil_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,8 @@ static bool emit_physical_buffer_load_instruction(Converter::Impl &impl, const l
ptr_bitcast_op->add_id(u64_ptr_id);
impl.add(ptr_bitcast_op);

auto *chain_op = impl.allocate(spv::OpAccessChain, builder.makePointer(spv::StorageClassPhysicalStorageBuffer, physical_type_id));
auto *chain_op = impl.allocate(spv::OpInBoundsAccessChain,
builder.makePointer(spv::StorageClassPhysicalStorageBuffer, physical_type_id));
chain_op->add_id(ptr_bitcast_op->id);
chain_op->add_id(builder.makeUintConstant(0));
if (array_id)
Expand Down Expand Up @@ -875,7 +876,8 @@ static bool emit_physical_buffer_store_instruction(Converter::Impl &impl, const
ptr_bitcast_op->add_id(u64_ptr_id);
impl.add(ptr_bitcast_op);

auto *chain_op = impl.allocate(spv::OpAccessChain, builder.makePointer(spv::StorageClassPhysicalStorageBuffer, vec_type_id));
auto *chain_op = impl.allocate(spv::OpInBoundsAccessChain,
builder.makePointer(spv::StorageClassPhysicalStorageBuffer, vec_type_id));
chain_op->add_id(ptr_bitcast_op->id);
chain_op->add_id(builder.makeUintConstant(0));
if (array_id)
Expand Down
14 changes: 7 additions & 7 deletions reference/shaders/resources/root-bda.root-descriptor.comp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e08570f

Please sign in to comment.