Code Monkey home page Code Monkey logo

Comments (6)

kingofthebongo2008 avatar kingofthebongo2008 commented on May 28, 2024 1

It may be a bug in the validator with the placed resources and placed resources that you supply virtual addresses directly in the root signature constant. i will confirm this and will reopen if there is something.

from d3d12memoryallocator.

adam-sawicki-a avatar adam-sawicki-a commented on May 28, 2024

I don't know where can this issue come from, as resource states are tracked per resource, not per memory heap where they are placed. The message says the resource state has been automatically promoted from COMMON to NON_PIXEL_SHADER_RESOURCE and then used as UAV. Please try to explicitly transition it to UNORDERED_ACCESS state before using it for the compute dispatch and see if it helps.

It is also possible that the validation layer has bugs. You can capture a frame using PIX and see what barriers, draw calls, and dispatches are executed that use this texture to figure out whether there is really something wrong with its state or it is a false alarm.

from d3d12memoryallocator.

kingofthebongo2008 avatar kingofthebongo2008 commented on May 28, 2024

there was one shader that was reading from uav, i have made it srv and the warning went away,
however now i have the same issue with the another uav,

It is in CollideHairVerticesWithSdf_forward from the tressfx sample. HairVertices buffer which is expected to be RW

Also something else.

If make allocations with ALLOCATION_FLAG_COMMITTED i still get the warning however if

I force CalcDefaultPoolIndex to return UINT32_MAX they stop.

I am on AMD 5700 XT

On the cpu side everything is correct no warnings from validation, may be there is a memory aliasing

any clue will be helpful.

I have not seen such a warning before from DX12.

D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE BEGIN: BoneSkinningUpdate [ EXECUTION MESSAGE #1014: BEGIN_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE END: BoneSkinningUpdate [ EXECUTION MESSAGE #1015: END_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE BEGIN: UpdateSDF [ EXECUTION MESSAGE #1014: BEGIN_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE BEGIN: UpdateSDF::ConstructSignedDistanceField [ EXECUTION MESSAGE #1014: BEGIN_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE END: UpdateSDF::ConstructSignedDistanceField [ EXECUTION MESSAGE #1015: END_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE BEGIN: UpdateSDF::ConstructSignedDistanceField [ EXECUTION MESSAGE #1014: BEGIN_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE END: UpdateSDF::ConstructSignedDistanceField [ EXECUTION MESSAGE #1015: END_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE BEGIN: UpdateSDF::ConstructSignedDistanceField [ EXECUTION MESSAGE #1014: BEGIN_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE END: UpdateSDF::ConstructSignedDistanceField [ EXECUTION MESSAGE #1015: END_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE END: UpdateSDF [ EXECUTION MESSAGE #1015: END_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE BEGIN: RunSimulation [ EXECUTION MESSAGE #1014: BEGIN_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE BEGIN: RunSimulation::IntegrationAndGlobalShapeContraints [ EXECUTION MESSAGE #1014: BEGIN_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE END: RunSimulation::IntegrationAndGlobalShapeContraints [ EXECUTION MESSAGE #1015: END_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE BEGIN: RunSimulation::CalculateStrandLevelData [ EXECUTION MESSAGE #1014: BEGIN_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE END: RunSimulation::CalculateStrandLevelData [ EXECUTION MESSAGE #1015: END_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE BEGIN: RunSimulation::VelocityShockPropagation [ EXECUTION MESSAGE #1014: BEGIN_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE END: RunSimulation::VelocityShockPropagation [ EXECUTION MESSAGE #1015: END_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE BEGIN: RunSimulation::LocalShapeConstraints [ EXECUTION MESSAGE #1014: BEGIN_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE END: RunSimulation::LocalShapeConstraints [ EXECUTION MESSAGE #1015: END_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE BEGIN: RunSimulation::LengthConstriantsWindAndCollision [ EXECUTION MESSAGE #1014: BEGIN_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE END: RunSimulation::LengthConstriantsWindAndCollision [ EXECUTION MESSAGE #1015: END_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE BEGIN: RunSimulation::UpdateFollowHairVertices [ EXECUTION MESSAGE #1014: BEGIN_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE END: RunSimulation::UpdateFollowHairVertices [ EXECUTION MESSAGE #1015: END_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE END: RunSimulation [ EXECUTION MESSAGE #1015: END_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE BEGIN: RunCollision [ EXECUTION MESSAGE #1014: BEGIN_EVENT]
D3D12 MESSAGE: GPU-BASED VALIDATION: TRACE BEGIN: RunCollision::CollideWithHair [ EXECUTION MESSAGE #1014: BEGIN_EVENT]
D3D12 ERROR: GPU-BASED VALIDATION: Dispatch, Incompatible resource state: Resource: 0x000002455B6852B0:'Unnamed ID3D12Resource Object', Subresource Index: [0], Root descriptor type: UAV, Resource State: D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE(0x40) (Promoted from COMMON state), Shader Stage: COMPUTE, Root Parameter Index: [2], Dispatch Index: [21], Shader Code: <couldn't find file location in debug info>, Asm Instruction Range: [0xa-0xffffffff], Asm Operand Index: [0], Command List: 0x000002455B26C190:'CommandList 2, Allocator 0', SRV/UAV/CBV Descriptor Heap: 0x000002455AF8DBA0:'StaticHeapDX12', Sampler Descriptor Heap: 0x000002455AF8F110:'StaticHeapDX12', Pipeline State: 0x000002455B83A6C0:'TressFXSDFCollision.hlslCollideHairVerticesWithSdf_forward', [ EXECUTION ERROR #942: GPU_BASED_VALIDATION_INCOMPATIBLE_RESOURCE_STATE]

from d3d12memoryallocator.

adam-sawicki-a avatar adam-sawicki-a commented on May 28, 2024

Does your application work correctly despite these errors reported by the validation?

Returning UINT32_MAX from CalcDefaultPoolIndex causes allocation of all the resources as committed.

If you suspect memory aliasing, please use Allocator::BuildStatsString to get JSON dump with the list of all allocations, their offsets and sizes. You can then validate whether they overlap. But I think this is very unlikely.

from d3d12memoryallocator.

kingofthebongo2008 avatar kingofthebongo2008 commented on May 28, 2024

from d3d12memoryallocator.

ForestCSharp avatar ForestCSharp commented on May 28, 2024

I'm also getting a similar issue, but with no adverse side-effects that I've seen in my application.

Always returning UINT32_MAX to force committed resources in AllocatorPimpl::CalcDefaultPoolIndex(...) suppresses these issues (or non-issues, it would seem).

from d3d12memoryallocator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.