Skip to content

Commit

Permalink
Rename MemoryBarrier func to InsertMemoryBarrier to avoid Windows issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Creighton committed Dec 10, 2022
1 parent bd80c98 commit 9729d74
Show file tree
Hide file tree
Showing 28 changed files with 40 additions and 40 deletions.
6 changes: 3 additions & 3 deletions pxr/imaging/hdSt/indirectDrawBatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ HdSt_IndirectDrawBatch::_ExecuteFrustumCull(

// Make sure the reset-pass memory writes
// are visible to the culling shader pass.
cullGfxCmds->MemoryBarrier(HgiMemoryBarrierAll);
cullGfxCmds->InsertMemoryBarrier(HgiMemoryBarrierAll);

// Perform Culling Pass
cullParamsInstanced.resetPass = 0;
Expand All @@ -1439,7 +1439,7 @@ HdSt_IndirectDrawBatch::_ExecuteFrustumCull(

// Make sure culling memory writes are
// visible to execute draw.
cullGfxCmds->MemoryBarrier(HgiMemoryBarrierAll);
cullGfxCmds->InsertMemoryBarrier(HgiMemoryBarrierAll);
} else {
// set cull parameters
Uniforms cullParams;
Expand All @@ -1455,7 +1455,7 @@ HdSt_IndirectDrawBatch::_ExecuteFrustumCull(
cullGfxCmds->Draw(_dispatchBufferCullInput->GetCount(), 0, 1, 0);

// Make sure culling memory writes are visible to execute draw.
cullGfxCmds->MemoryBarrier(HgiMemoryBarrierAll);
cullGfxCmds->InsertMemoryBarrier(HgiMemoryBarrierAll);
}

cullGfxCmds->PopDebugGroup();
Expand Down
6 changes: 3 additions & 3 deletions pxr/imaging/hdSt/pipelineDrawBatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@ HdSt_PipelineDrawBatch::_ExecuteFrustumCull(

// Make sure the reset-pass memory writes
// are visible to the culling shader pass.
cullGfxCmds->MemoryBarrier(HgiMemoryBarrierAll);
cullGfxCmds->InsertMemoryBarrier(HgiMemoryBarrierAll);

// Perform Culling Pass
cullParamsInstanced.resetPass = 0;
Expand All @@ -1706,7 +1706,7 @@ HdSt_PipelineDrawBatch::_ExecuteFrustumCull(

// Make sure culling memory writes are
// visible to execute draw.
cullGfxCmds->MemoryBarrier(HgiMemoryBarrierAll);
cullGfxCmds->InsertMemoryBarrier(HgiMemoryBarrierAll);
} else {
// set cull parameters
Uniforms cullParams;
Expand All @@ -1722,7 +1722,7 @@ HdSt_PipelineDrawBatch::_ExecuteFrustumCull(
cullGfxCmds->Draw(_dispatchBufferCullInput->GetCount(), 0, 1, 0);

// Make sure culling memory writes are visible to execute draw.
cullGfxCmds->MemoryBarrier(HgiMemoryBarrierAll);
cullGfxCmds->InsertMemoryBarrier(HgiMemoryBarrierAll);
}

cullGfxCmds->PopDebugGroup();
Expand Down
6 changes: 3 additions & 3 deletions pxr/imaging/hdSt/resourceRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ HdStResourceRegistry::_Commit()

// Make sure the writes are visible to computations that follow
if (_blitCmds) {
_blitCmds->MemoryBarrier(HgiMemoryBarrierAll);
_blitCmds->InsertMemoryBarrier(HgiMemoryBarrierAll);
}
SubmitBlitWork();
}
Expand All @@ -972,11 +972,11 @@ HdStResourceRegistry::_Commit()
// We must ensure that shader writes are visible to computations
// in the next queue by setting a memory barrier.
if (_blitCmds) {
_blitCmds->MemoryBarrier(HgiMemoryBarrierAll);
_blitCmds->InsertMemoryBarrier(HgiMemoryBarrierAll);
SubmitBlitWork();
}
if (_computeCmds) {
_computeCmds->MemoryBarrier(HgiMemoryBarrierAll);
_computeCmds->InsertMemoryBarrier(HgiMemoryBarrierAll);
SubmitComputeWork();
}
}
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgi/blitCmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class HgiBlitCmds : public HgiCmds
/// Inserts a barrier so that data written to memory by commands before
/// the barrier is available to commands after the barrier.
HGI_API
virtual void MemoryBarrier(HgiMemoryBarrier barrier) = 0;
virtual void InsertMemoryBarrier(HgiMemoryBarrier barrier) = 0;

protected:
HGI_API
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgi/computeCmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class HgiComputeCmds : public HgiCmds
/// Inserts a barrier so that data written to memory by commands before
/// the barrier is available to commands after the barrier.
HGI_API
virtual void MemoryBarrier(HgiMemoryBarrier barrier) = 0;
virtual void InsertMemoryBarrier(HgiMemoryBarrier barrier) = 0;

protected:
HGI_API
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgi/graphicsCmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class HgiGraphicsCmds : public HgiCmds
/// Inserts a barrier so that data written to memory by commands before
/// the barrier is available to commands after the barrier.
HGI_API
virtual void MemoryBarrier(HgiMemoryBarrier barrier) = 0;
virtual void InsertMemoryBarrier(HgiMemoryBarrier barrier) = 0;

protected:
HGI_API
Expand Down
4 changes: 2 additions & 2 deletions pxr/imaging/hgiGL/blitCmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ HgiGLBlitCmds::GenerateMipMaps(HgiTextureHandle const& texture)
}

void
HgiGLBlitCmds::MemoryBarrier(HgiMemoryBarrier barrier)
HgiGLBlitCmds::InsertMemoryBarrier(HgiMemoryBarrier barrier)
{
_ops.push_back( HgiGLOps::MemoryBarrier(barrier) );
_ops.push_back( HgiGLOps::InsertMemoryBarrier(barrier) );
}

bool
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiGL/blitCmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class HgiGLBlitCmds final : public HgiBlitCmds
void FillBuffer(HgiBufferHandle const& buffer, uint8_t value) override;

HGIGL_API
void MemoryBarrier(HgiMemoryBarrier barrier) override;
void InsertMemoryBarrier(HgiMemoryBarrier barrier) override;

protected:
friend class HgiGL;
Expand Down
4 changes: 2 additions & 2 deletions pxr/imaging/hgiGL/computeCmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ HgiGLComputeCmds::PopDebugGroup()
}

void
HgiGLComputeCmds::MemoryBarrier(HgiMemoryBarrier barrier)
HgiGLComputeCmds::InsertMemoryBarrier(HgiMemoryBarrier barrier)
{
_ops.push_back( HgiGLOps::MemoryBarrier(barrier) );
_ops.push_back( HgiGLOps::InsertMemoryBarrier(barrier) );
}

bool
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiGL/computeCmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class HgiGLComputeCmds final : public HgiComputeCmds
void Dispatch(int dimX, int dimY) override;

HGIGL_API
void MemoryBarrier(HgiMemoryBarrier barrier) override;
void InsertMemoryBarrier(HgiMemoryBarrier barrier) override;

protected:
friend class HgiGL;
Expand Down
4 changes: 2 additions & 2 deletions pxr/imaging/hgiGL/graphicsCmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ HgiGLGraphicsCmds::PopDebugGroup()
}

void
HgiGLGraphicsCmds::MemoryBarrier(HgiMemoryBarrier barrier)
HgiGLGraphicsCmds::InsertMemoryBarrier(HgiMemoryBarrier barrier)
{
_ops.push_back( HgiGLOps::MemoryBarrier(barrier) );
_ops.push_back( HgiGLOps::InsertMemoryBarrier(barrier) );
}

bool
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiGL/graphicsCmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class HgiGLGraphicsCmds final : public HgiGraphicsCmds
uint32_t patchBaseVertexByteOffset) override;

HGIGL_API
void MemoryBarrier(HgiMemoryBarrier barrier) override;
void InsertMemoryBarrier(HgiMemoryBarrier barrier) override;

protected:
friend class HgiGL;
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiGL/ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ HgiGLOps::ResolveFramebuffer(
}

HgiGLOpsFn
HgiGLOps::MemoryBarrier(HgiMemoryBarrier barrier)
HgiGLOps::InsertMemoryBarrier(HgiMemoryBarrier barrier)
{
return [barrier] {
if (TF_VERIFY(barrier == HgiMemoryBarrierAll)) {
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiGL/ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class HgiGLOps
static HgiGLOpsFn GenerateMipMaps(HgiTextureHandle const& texture);

HGIGL_API
static HgiGLOpsFn MemoryBarrier(HgiMemoryBarrier barrier);
static HgiGLOpsFn InsertMemoryBarrier(HgiMemoryBarrier barrier);

};

Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiMetal/blitCmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class HgiMetalBlitCmds final : public HgiBlitCmds
void FillBuffer(HgiBufferHandle const& buffer, uint8_t value) override;

HGIMETAL_API
void MemoryBarrier(HgiMemoryBarrier barrier) override;
void InsertMemoryBarrier(HgiMemoryBarrier barrier) override;

protected:
friend class HgiMetal;
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiMetal/blitCmds.mm
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@
}

void
HgiMetalBlitCmds::MemoryBarrier(HgiMemoryBarrier barrier)
HgiMetalBlitCmds::InsertMemoryBarrier(HgiMemoryBarrier barrier)
{
TF_VERIFY(barrier==HgiMemoryBarrierAll, "Unknown barrier");
// Do nothing. All blit encoder work will be visible to next encoder.
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiMetal/computeCmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class HgiMetalComputeCmds final : public HgiComputeCmds
void PopDebugGroup() override;

HGIMETAL_API
void MemoryBarrier(HgiMemoryBarrier barrier) override;
void InsertMemoryBarrier(HgiMemoryBarrier barrier) override;

HGIMETAL_API
id<MTLComputeCommandEncoder> GetEncoder();
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiMetal/computeCmds.mm
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
}

void
HgiMetalComputeCmds::MemoryBarrier(HgiMemoryBarrier barrier)
HgiMetalComputeCmds::InsertMemoryBarrier(HgiMemoryBarrier barrier)
{
if (TF_VERIFY(barrier == HgiMemoryBarrierAll)) {
_CreateEncoder();
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiMetal/graphicsCmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class HgiMetalGraphicsCmds final : public HgiGraphicsCmds
void PopDebugGroup() override;

HGIMETAL_API
void MemoryBarrier(HgiMemoryBarrier barrier) override;
void InsertMemoryBarrier(HgiMemoryBarrier barrier) override;

HGIMETAL_API
void EnableParallelEncoder(bool enable);
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiMetal/graphicsCmds.mm
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@
}

void
HgiMetalGraphicsCmds::MemoryBarrier(HgiMemoryBarrier barrier)
HgiMetalGraphicsCmds::InsertMemoryBarrier(HgiMemoryBarrier barrier)
{
TF_VERIFY(barrier==HgiMemoryBarrierAll, "Unknown barrier");

Expand Down
4 changes: 2 additions & 2 deletions pxr/imaging/hgiVulkan/blitCmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,10 @@ HgiVulkanBlitCmds::FillBuffer(HgiBufferHandle const& buffer, uint8_t value)
}

void
HgiVulkanBlitCmds::MemoryBarrier(HgiMemoryBarrier barrier)
HgiVulkanBlitCmds::InsertMemoryBarrier(HgiMemoryBarrier barrier)
{
_CreateCommandBuffer();
_commandBuffer->MemoryBarrier(barrier);
_commandBuffer->InsertMemoryBarrier(barrier);
}

HgiVulkanCommandBuffer*
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiVulkan/blitCmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class HgiVulkanBlitCmds final : public HgiBlitCmds
void FillBuffer(HgiBufferHandle const& buffer, uint8_t value) override;

HGIVULKAN_API
void MemoryBarrier(HgiMemoryBarrier barrier) override;
void InsertMemoryBarrier(HgiMemoryBarrier barrier) override;

/// Returns the command buffer used inside this cmds.
HGIVULKAN_API
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiVulkan/commandBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ HgiVulkanCommandBuffer::GetDevice() const
}

void
HgiVulkanCommandBuffer::MemoryBarrier(HgiMemoryBarrier barrier)
HgiVulkanCommandBuffer::InsertMemoryBarrier(HgiMemoryBarrier barrier)
{
if (!_vkCommandBuffer) {
return;
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiVulkan/commandBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class HgiVulkanCommandBuffer final
/// Inserts a barrier so that data written to memory by commands before
/// the barrier is available to commands after the barrier.
HGIVULKAN_API
void MemoryBarrier(HgiMemoryBarrier barrier);
void InsertMemoryBarrier(HgiMemoryBarrier barrier);

/// Returns the id that uniquely identifies this command buffer amongst
/// all in-flight command buffers.
Expand Down
4 changes: 2 additions & 2 deletions pxr/imaging/hgiVulkan/computeCmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ HgiVulkanComputeCmds::_BindResources()
}

void
HgiVulkanComputeCmds::MemoryBarrier(HgiMemoryBarrier barrier)
HgiVulkanComputeCmds::InsertMemoryBarrier(HgiMemoryBarrier barrier)
{
_CreateCommandBuffer();
_commandBuffer->MemoryBarrier(barrier);
_commandBuffer->InsertMemoryBarrier(barrier);
}

void
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiVulkan/computeCmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class HgiVulkanComputeCmds final : public HgiComputeCmds
void Dispatch(int dimX, int dimY) override;

HGIVULKAN_API
void MemoryBarrier(HgiMemoryBarrier barrier) override;
void InsertMemoryBarrier(HgiMemoryBarrier barrier) override;

protected:
friend class HgiVulkan;
Expand Down
4 changes: 2 additions & 2 deletions pxr/imaging/hgiVulkan/graphicsCmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,10 @@ HgiVulkanGraphicsCmds::DrawIndexedIndirect(
}

void
HgiVulkanGraphicsCmds::MemoryBarrier(HgiMemoryBarrier barrier)
HgiVulkanGraphicsCmds::InsertMemoryBarrier(HgiMemoryBarrier barrier)
{
_CreateCommandBuffer();
_commandBuffer->MemoryBarrier(barrier);
_commandBuffer->InsertMemoryBarrier(barrier);
}

HgiVulkanCommandBuffer*
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hgiVulkan/graphicsCmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class HgiVulkanGraphicsCmds final : public HgiGraphicsCmds
uint32_t patchBaseVertexByteOffset) override;

HGIVULKAN_API
void MemoryBarrier(HgiMemoryBarrier barrier) override;
void InsertMemoryBarrier(HgiMemoryBarrier barrier) override;

/// Returns the command buffer used inside this cmds.
HGIVULKAN_API
Expand Down

0 comments on commit 9729d74

Please sign in to comment.