Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
turanszkij committed Jan 9, 2025
1 parent 20e16f2 commit 7da83d0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions WickedEngine/wiHairParticle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ namespace wi
uint64_t buffer_offset = 0ull;

const uint32_t indirect_stride = sizeof(IndirectDrawArgsIndexedInstanced);
buffer_offset = AlignTo(buffer_offset, sizeof(IndirectDrawArgsIndexedInstanced)); // additional structured buffer alignment
buffer_offset = AlignTo(buffer_offset, alignment);
indirect_view.offset = buffer_offset;
indirect_view.subresource_srv = device->CreateSubresource(&generalBuffer, SubresourceType::SRV, indirect_view.offset, indirect_view.size, nullptr, &indirect_stride);
Expand All @@ -155,7 +154,6 @@ namespace wi
buffer_offset += indirect_view.size;

const uint32_t simulation_stride = sizeof(PatchSimulationData);
buffer_offset = AlignTo(buffer_offset, sizeof(PatchSimulationData)); // additional structured buffer alignment
buffer_offset = AlignTo(buffer_offset, alignment);
simulation_view.offset = buffer_offset;
simulation_view.subresource_srv = device->CreateSubresource(&generalBuffer, SubresourceType::SRV, simulation_view.offset, simulation_view.size, nullptr, &simulation_stride);
Expand Down
4 changes: 1 addition & 3 deletions WickedEngine/wiScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,7 @@ namespace wi::scene

const uint64_t alignment =
device->GetMinOffsetAlignment(&desc) *
sizeof(IndirectDrawArgsIndexedInstanced) * // additional alignment
sizeof(MeshComponent::Vertex_POS32W) // additional alignment
sizeof(IndirectDrawArgsIndexedInstanced) // additional alignment
;

desc.size =
Expand All @@ -799,7 +798,6 @@ namespace wi::scene
uint64_t buffer_offset = 0ull;

const uint32_t indirect_stride = sizeof(IndirectDrawArgsIndexedInstanced);
buffer_offset = AlignTo(buffer_offset, sizeof(IndirectDrawArgsIndexedInstanced)); // additional structured buffer alignment
buffer_offset = AlignTo(buffer_offset, alignment);
impostor_indirect.offset = buffer_offset;
impostor_indirect.size = sizeof(IndirectDrawArgsIndexedInstanced);
Expand Down

0 comments on commit 7da83d0

Please sign in to comment.