Jump to content
  • Advertisement

red75prime

Member
  • Content Count

    25
  • Joined

  • Last visited

Community Reputation

592 Good

About red75prime

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Buffer and RWBuffer are arrays of XMFLOAT4 (so to speak). You treat gInput as array of XMLFLOAT3, and gOutput as array of float.   You can change definitions of gInput and gOutput to match provided data by using StructuredBuffer and RWStructuredBuffer: StructuredBuffer<float3> gInput : register(b0); RWStructuredBuffer<float> gOutput : register(u1);
  2. red75prime

    DirectX 12 Multi Threading

      Root signature and pipeline state are immutable objects, so I'm pretty sure that they are thread safe. Of course, you have to make sure that pRS is initialized before threads run and that object pointed to by pRS is not destroyed while threads are still running.
  3. Actually, there are 2 full-screen modes. Borderless full-screen window is one of them, but I had in mind "true full-screen mode", which is set by passing TRUE into IDXGISwapChain::SetFullscreenState() or by setting DXGI_SWAP_CHAIN_DESC Windowed field to FALSE when creating swap-chain.   "True full-screen mode" can be more efficient by eliminating data transfer from swap-chain buffers to Desktop Window Manager, but there are many details to that. You should consult https://msdn.microsoft.com/en-us/library/windows/desktop/bb205075(v=vs.85).aspx to get up-to date information on the topic. My knowledge of this is a bit stale.
  4.   It is not RDP only thing. If your computer has two videocards and you render on first, but display is attached to second, you can't switch swap-chain into full-screen mode too.
  5. My program works fine over RDP. I just reviewed history of commits in my project. I didn't find anything related to bugs when working over RDP.   So, I can give just general suggestions. Check HRESULTs for errors, enable debug layer, if you haven't enabled it yet, don't forget that you can't switch to full-screen mode when working over RDP.
  6. Sure. Link to compiled executable https://1drv.ms/u/s!AvWBtQrumRfzhqdM8mM0D31qVhgRqg   Run with start.cmd. ETA: Program will crash when GBV is enabled as Rust doesn't support structured exceptions. If I use debugger to continue execution, then error messages are shown and errors appear again when I resize window. I recreate all DirectWrite related objects on resize.     Source code is at https://github.com/red75prime/dxgen/tree/master/src/dxgen/scaffolding   Project build steps: 1. Install Windows 10 SDK 2. Install Rust-MSVC 64-bit from https://www.rust-lang.org/ 3. Run 'cargo build' or 'cargo build --release' in the project folder using Rust shell     ETA: The program also crashes when light source is visible while rendering on Microsoft Basic Render Driver. Command line to render on Nth (zero based) adapter is 'd3d_integration_test N'. Crash is caused by integer division-by-zero somewhere inside the driver.
  7. Nice tool. But in my application all it reports is premature eviction of its own buffer ('D3D12 Internal GBV Message Log Buffer') somewhere inside ID2DFactory::CreateDevice and ID2D1DeviceContext2::EndDraw.   I use DWrite on D2D1Device on D3D11On12Device. ERROR:d3d12_integration_test::core: ID3D12Device::Evict: CORRUPTION: An ID3D12Resource object (0x0000022D99735350:'D3D12 Internal GBV Message Log Buffer') is referenced by GPU operations in-flight on Command Queue (0x0000022D98277070:'Graphics command queue').  It is not safe to Evict objects that may have GPU operations pending.  This can result in application instability.
  8. Do you run this on laptop? Does it have Nvidia's Optimus tech? http://gamedev.stackexchange.com/questions/105003/d3d12-device-not-supported
  9. While debugging Visual Studio shows DLLs loaded into your process, you can look for something suspicious there. Also you can try to use CreateDXGIFactory2 instead of CreateDXGIFactory, at a cost of not being able to use GPU debugging. The offending program hooked only CreateDXGIFactory in my case.
  10. Do you have some software, capable of showing overlay in Direct3D applications, on your computer? I had similar problems with EVGA Precision.
  11. Did anyone experience something similar?   EDIT: crash information: 0xC0000094: Integer division by zero in d3d12warp.dll!Interpolate<class EdgeIteratorPairGeneric<class EdgeIterator,1,0> >(struct InterpolationContext &)     WARP device crashes program when I use conservative rendering. Crash occurs inside working thread of WARP device (I guessed it by call stack). Crash occurs only when the shape, I draw using conservative rasterization, is visible. GTX 980 works fine.   Pipeline setup (in Rust): https://github.com/red75prime/dxgen/blob/8824b6f79c7353cd807adced67a628f9457eea0d/src/dxgen/scaffolding/src/light.rs#L51-L74   Command list: https://github.com/red75prime/dxgen/blob/8824b6f79c7353cd807adced67a628f9457eea0d/src/dxgen/scaffolding/src/light.rs#L142-L152   Resources (I use upload heap): https://github.com/red75prime/dxgen/blob/8824b6f79c7353cd807adced67a628f9457eea0d/src/dxgen/scaffolding/src/light.rs#L98-L130   I don't use input assembler in shader. // constants, instance data, indices, coordinated, normals, texture coords #define RSD "RootFlags(0)," \ "CBV(b0), SRV(t1), SRV(t2), SRV(t3)" #include "view_constants.hlsl" //// Content of view_constants.hlsl //cbuffer cb0 : register(b0) { // float4x4 view; // float4x4 proj; // float3 eye_pos; // float3 light_pos; //} struct Indices { uint crd; uint nrm; uint tex; }; StructuredBuffer<Indices> indices : register(t1); StructuredBuffer<float3> coords: register(t2); StructuredBuffer<float3> normals: register(t3); //StructuredBuffer<float2> tex_coord: register(t4); struct VS_OUTPUT { float4 pos: SV_Position; }; [RootSignature(RSD)] VS_OUTPUT VSMain(uint vtx: SV_VertexID) { VS_OUTPUT ret; // Instancing isn't used for now. Number of instances is 1. ret.pos = float4(coords[indices[vtx].crd]/10 + light_pos, 1); ret.pos = mul(ret.pos, view); ret.pos = mul(ret.pos, proj); return ret; } [RootSignature(RSD)] float4 PSMain() : SV_TARGET { return float4(200, 200, 200, 1); }
  12. red75prime

    [D3D12] Ping Pong Rendering

      I had similar problem. Try to put UAV resource barrier after Dispatch. https://msdn.microsoft.com/en-us/library/windows/desktop/dn986740(v=vs.85).aspx
  13. red75prime

    D3D12: Copy Queue and ResourceBarrier

      Are you sure? In the MSDN article it states that, "The COPY flags (COPY_DEST and COPY_SOURCE) used as initial states represent states in the 3D/Compute type class. To use a resource initially on a Copy queue it should start in the COMMON state". So I assume both resources that are involved in a copy must start in D3D12_RESOURCE_STATE_COMMON.     Sloppy phrasing on my side. I meant these states are safe in resource barriers on copy queue.       I just compiled and tested my program without any resource barriers on copy queue, it still works fine without warnings from debug layer. Then I tried to transition texture to UNORDERED_ACCESS (just to check that this portion of code gets executed), it failed with E_INVALIDARG, as expected. So it seems promotion works as advertised.   EDIT: I tested the program on GTX 980, HD 4600, R7 360, Microsoft Basic Render Driver.
  14. red75prime

    D3D12: Copy Queue and ResourceBarrier

    Hmm. This code works fine: https://github.com/red75prime/dxgen/blob/26d15f61e0d9fac0f4e2adfb2f2bce595c94e975/src/dxgen/scaffolding/src/utils.rs#L151   It even worked without first resource barrier. Something to do with promotable flags, I guess.
  15. red75prime

    D3D12: Copy Queue and ResourceBarrier

      Copy queue doesn't seem to support all resource states. I found it is safe to use COMMON, COPY_SOURCE and COPY_DEST states in copy queue. Also, if I'm correctly understand "promotable flags" part of the MSDN article, then resource barrier isn't necessary on copy queue if resources are in COMMON state.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!