Sign in to follow this  

DX11 [Solved] DX11 Updating texture data

This topic is 2344 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

After looking through all the threads I could find relating to this topic and failing, it would seem it is now time to ask for some help.


I have a 32bit BGRA buffer that I am binding to a texture:
[Code]
D3D11_TEXTURE2D_DESC td;
td.ArraySize = 1;
td.BindFlags = D3D11_BIND_SHADER_RESOURCE;
td.Usage = D3D11_USAGE_DYNAMIC;
td.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
td.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
td.Height = m_renderBuffer.height;
td.Width = m_renderBuffer.width;
td.MipLevels = 1;
td.MiscFlags = 0;
td.SampleDesc.Count = 1;
td.SampleDesc.Quality = 0;

D3D11_SUBRESOURCE_DATA srd;
srd.pSysMem = m_renderBuffer.buffer;
srd.SysMemPitch = m_renderBuffer.rowspan;
srd.SysMemSlicePitch = 0;

HR(device->CreateTexture2D(&td, &srd, &m_texture));
[/Code]

which I then bind to a ShaderResourceView and set as a shader resource
[Code]
HR(device->CreateShaderResourceView(m_texture, 0, &m_textureRV));
.
.
deviceContext->PSSetShaderResources(0, 1, &m_textureRV);
[/Code]

I render this once and it works just as expected.
Then I try to update the texture..
[Code]
HR(deviceContext->Map(m_texture, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource)

mappedResource.pData = (void*)m_renderBuffer.buffer;
mappedResource.RowPitch = m_renderBuffer.rowspan;
mappedResource.DepthPitch = 0;

deviceContext->Unmap(m_texture, 0);
[/Code]

Right now Im just updating with the same buffer but that wont be the case in reality. After I try to update the texture, the texture is no longer shows up, and nothing shows up anymore. I am not getting any errors related to this from the Debug Device. I feel like I am doing everything correctly. Creating the texture with D3D11_USAGE_DYNAMIC, and D3D11_CPU_ACCESS_WRITE then using Map to update the texture. Everything I read says this is the proper method. Either I missed something, or I am doing it incorrectly.

Any ideas?

Share this post


Link to post
Share on other sites
[font="Arial"][size="2"]You're not using this right. What Map() does is reserve a piece of GPU memory for you to copy your data in, and gives you a pointer that you can use to write into that memory. That's the [color="#1C2837"][color="#000000"]mappedResource[/color][color="#666600"].[/color][color="#000000"]pData pointer. You're not meant to set that pointer to your data, but instead copy your data into the memory it points to.[/color][/color][/size][/font]

Share this post


Link to post
Share on other sites
So I am trying to update my buffer and after copying my new texture data in, the texture is rendered with a shearing effect.

[Code]

D3D11_MAPPED_SUBRESOURCE mappedResource;
HR(deviceContext->Map(m_texture, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource));
memcpy(mappedResource.pData, buffer, rowspan*height);
deviceContext->Unmap(m_texture, 0);
[/Code]

I am pretty sure the buffer itself is not the issue because so my guess is it has something to do with my use of memcpy but i just do see it.
I feel like I am being a little vague, but cant think of anything else to say haha. I can try to elaborate if need be.

Share this post


Link to post
Share on other sites
The texture resource will have it's own pitch (the number of bytes in a row), which is probably different than the pitch of your source data. This pitch is given to you as the "RowPitch" member of D3D11_MAPPED_SUBRESOURCE. So typically you do something like this:
[code]
BYTE* mappedData = reinterpret_cast<BYTE*>(mappedResource.pData);
for(UINT i = 0; i < height; ++i)
{
memcpy(mappedData, buffer, rowspan);
mappedData += mappedResource.RowPitch;
buffer += rowspan;
}
[/code]

Share this post


Link to post
Share on other sites
[quote name='MJP' timestamp='1310492347' post='4834406']
The texture resource will have it's own pitch (the number of bytes in a row), which is probably different than the pitch of your source data. This pitch is given to you as the "RowPitch" member of D3D11_MAPPED_SUBRESOURCE. So typically you do something like this:
[code]
BYTE* mappedData = reinterpret_cast<BYTE*>(mappedResource.pData);
for(UINT i = 0; i < height; ++i)
{
memcpy(mappedData, buffer, rowspan);
mappedData += mappedResource.RowPitch;
buffer += rowspan;
}
[/code]
[/quote]

Excellent, works perfectly. Except now I am curious why the pitch of the texture is different when I set the pitch in the D3D11_SUBRESOURCE_DATA description.

Share this post


Link to post
Share on other sites
[size="3"][font="Calibri"][size="3"][font="Calibri"][/font][/size]

You don’t set the pitch with D3D11_SUBRESOURCE_DATA. You just tell the runtime what pitch your data uses. The runtime will use this information and the real pitch from your texture to copy the data correctly. As Map gives you a memory pointer were the driver wants the data to be copied it tells you the real pitch.[/font][/size]

Share this post


Link to post
Share on other sites
Everything is working and I am updating the texture several times a second. After about 30 seconds or so I get a E_OUTOFMEMORY error from:

[size="2"][Code]deviceContext->Map(m_texture, 0, D3D11_MAP_WRITE_DISCARD], 0, &mappedResource)[/Code][/size]

All I am doing in my program is updating the texture, then drawing the texture on a quad.

Could it be how I am updating my constant buffer and resource view for the shader that is causing this problem? I dont feel like that would be it assuming I was doing something incorrectly.
[font="CourierNew, monospace"] [/font]
[font="CourierNew, monospace"] [/font]

Share this post


Link to post
Share on other sites
[quote name='MJP' timestamp='1310492347' post='4834406']
The texture resource will have it's own pitch (the number of bytes in a row), which is probably different than the pitch of your source data. This pitch is given to you as the "RowPitch" member of D3D11_MAPPED_SUBRESOURCE. So typically you do something like this:
[code]
BYTE* mappedData = reinterpret_cast<BYTE*>(mappedResource.pData);
for(UINT i = 0; i < height; ++i)
{
memcpy(mappedData, buffer, rowspan);
mappedData += mappedResource.RowPitch;
buffer += rowspan;
}
[/code]
[/quote]

MJP, I've seen you post this at least twice now besides for me, I'm thinking that maybe msdn should post the information about this under the map method in remarks?

Share this post


Link to post
Share on other sites
[quote name='Sturmh' timestamp='1310580540' post='4834932']
Everything is working and I am updating the texture several times a second. After about 30 seconds or so I get a E_OUTOFMEMORY error from:

[size="2"][Code]deviceContext->Map(m_texture, 0, D3D11_MAP_WRITE_DISCARD], 0, &mappedResource)[/Code][/size]

All I am doing in my program is updating the texture, then drawing the texture on a quad.

Could it be how I am updating my constant buffer and resource view for the shader that is causing this problem? I dont feel like that would be it assuming I was doing something incorrectly.
[font="CourierNew, monospace"] [/font]
[font="CourierNew, monospace"] [/font]
[/quote]

I've never heard of an out of memory error happening from mapping a resource. You're not creating any resources during the frame, are you? Also, did you remember to call Unmap after copying in the data?

Share this post


Link to post
Share on other sites
[quote name='SnailCoder' timestamp='1310655297' post='4835277']
[quote name='MJP' timestamp='1310492347' post='4834406']
The texture resource will have it's own pitch (the number of bytes in a row), which is probably different than the pitch of your source data. This pitch is given to you as the "RowPitch" member of D3D11_MAPPED_SUBRESOURCE. So typically you do something like this:
[code]
BYTE* mappedData = reinterpret_cast<BYTE*>(mappedResource.pData);
for(UINT i = 0; i < height; ++i)
{
memcpy(mappedData, buffer, rowspan);
mappedData += mappedResource.RowPitch;
buffer += rowspan;
}
[/code]
[/quote]

MJP, I've seen you post this at least twice now besides for me, I'm thinking that maybe msdn should post the information about this under the map method in remarks?
[/quote]

Yeah, that would be nice. I can also add it under the "community content" section at the bottom of the page, which might be helpful for some people.

Share this post


Link to post
Share on other sites
[quote name='MJP' timestamp='1310668864' post='4835371']
[quote name='Sturmh' timestamp='1310580540' post='4834932']
Everything is working and I am updating the texture several times a second. After about 30 seconds or so I get a E_OUTOFMEMORY error from:

[size="2"][Code]deviceContext->Map(m_texture, 0, D3D11_MAP_WRITE_DISCARD], 0, &mappedResource)[/Code][/size]

All I am doing in my program is updating the texture, then drawing the texture on a quad.

Could it be how I am updating my constant buffer and resource view for the shader that is causing this problem? I dont feel like that would be it assuming I was doing something incorrectly.
[font="CourierNew, monospace"] [/font]
[font="CourierNew, monospace"] [/font]
[/quote]

I've never heard of an out of memory error happening from mapping a resource. You're not creating any resources during the frame, are you? Also, did you remember to call Unmap after copying in the data?
[/quote]

No I am not.
Each frame i call two functions, update() and render().
update -> update a buffer, check if it changed from last frame, and if it did, update the texture with:

[Code]
HR(deviceContext->Map(m_texture, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource));

BYTE* mappedData = reinterpret_cast<BYTE*>(mappedResource.pData);
for(UINT i = 0; i < m_renderBuffer.height; ++i)
{
memcpy(mappedData, m_renderBuffer.buffer, m_renderBuffer.rowspan);
mappedData += mappedResource.RowPitch;
m_renderBuffer.buffer += m_renderBuffer.rowspan;
}
deviceContext->Unmap(m_texture, 0);
[/Code]

Additionally, every time i call map here, the D3D debug output says "Error:......Resource is already mapped" or something of the sort. I know for a fact that the above map call is the cause of the "error"

I ran it once with the texture size at about 300 x 150, as opposed to about 800 x 400, and I never encountered the E_OUTOFMEMORY problem,

Share this post


Link to post
Share on other sites
[quote name='Sturmh' timestamp='1310669951' post='4835383']
Additionally, every time i call map here, the D3D debug output says "Error:......Resource is already mapped" or something of the sort.
[/quote]

Well that definitely sounds like your problem. The driver is probably continuing to allocate hidden textures behind the scenes (since that's what they do to avoid stalling when updating dynamic resources), and not freeing them because you're not unmapping them.

Share this post


Link to post
Share on other sites
Hidden
[quote name='MJP' timestamp='1310677463' post='4835435']
[quote name='Sturmh' timestamp='1310669951' post='4835383']
Additionally, every time i call map here, the D3D debug output says "Error:......Resource is already mapped" or something of the sort.
[/quote]

Well that definitely sounds like your problem. The driver is probably continuing to allocate hidden textures behind the scenes (since that's what they do to avoid stalling when updating dynamic resources), and not freeing them because you're not unmapping them.
[/quote]

I'm sorry but I am still confused haha. Like I said before every frame, I am only updating the texture and rendering it.
[Code]

HR(deviceContext->Map(m_texture, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource));

BYTE* mappedData = reinterpret_cast<BYTE*>(mappedResource.pData);
unsigned char* keep = m_buffer.buffer;
for(UINT i = 0; i < m_buffer.height; ++i)
{
memcpy(mappedData, m_buffer.buffer, m_buffer.rowspan);
mappedData += mappedResource.RowPitch;
m_buffer.buffer += m_buffer.rowspan;
}
m_buffer.buffer = keep;
deviceContext->Unmap(m_texture, 0);
[/Code]
allocating resources and furthermore how do I figure out how to free it. Is it the second parameter of Unmap? Either way I'm stumped haha.

Share this post


Link to post
[quote name='MJP' timestamp='1310677463' post='4835435']
[quote name='Sturmh' timestamp='1310669951' post='4835383']
Additionally, every time i call map here, the D3D debug output says "Error:......Resource is already mapped" or something of the sort.
[/quote]

Well that definitely sounds like your problem. The driver is probably continuing to allocate hidden textures behind the scenes (since that's what they do to avoid stalling when updating dynamic resources), and not freeing them because you're not unmapping them.
[/quote]

Sorry but I am still a little confused. How do I free these hidden textures haha. I'm not really sure where I should be looking to try and fix this. Could I be using incorrect parameters for the Map and Unmap calls. Also, could it be my code to render, even though I have pinpointed the "Resource already mapped" error. I'm just stumped haha.

Share this post


Link to post
Share on other sites
To expand on what I said previously, could I be using the Subresource parameter of the map call incorrectly? I dont really understand what that corresponds to. I dont know if this is correct but I am using the same subresource parameter when mapping the buffer to the texture as when I map my constant buffer for the vertex shader. This is the only other map call in the program. I dont know if posting this code will be any help, but it wont hurt:


[Code]

//Lock constant buffer to write to it
HR(deviceContext->Map(m_matrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResources));

//Get point to data in constant buffer
matrixBuffer = (MatrixBuffer*)mappedResources.pData;

matrixBuffer->world = world;
matrixBuffer->view = view;
matrixBuffer->proj = proj;

//Unlock constant buffer after done writing to it
deviceContext->Unmap(m_matrixBuffer, 0);

//Set contant buffer in the vertex shader with new values
deviceContext->VSSetConstantBuffers(0, 1, &m_matrixBuffer);

//Set shader texture resource in the pixel shader
deviceContext->PSSetShaderResources(0, 1, &m_textureRV);
[/Code]


Edit:
Hmm, I just noticed when I comment out the map call to update the texture I still get:
D3D11: ERROR: ID3D11DeviceContext::Map: This resource is already mapped! [ RESOURCE_MANIPULATION ERROR #2097213: RESOURCE_MAP_ALREADYMAPPED ]

This also happens when I comment out the map call for updating the constant buffer and running the map call updating the texture;

I would seem all my attempts to use the map function are not working out to well. Some additional understanding of how to properly use of the map function, if I am indeed using it incorrectly, would be greatly appreciated.

Share this post


Link to post
Share on other sites
I changed up the program to see if some other part of my code was indirectly causing the mapping issue. Now, all I am doing is initializing D3D then calling this
[Code]
//Fill out texture desc
D3D11_TEXTURE2D_DESC td;
td.ArraySize = 1;
td.BindFlags = D3D11_BIND_SHADER_RESOURCE;
td.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
td.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
td.Height = 500;
td.MipLevels = 1;
td.MiscFlags = 0;
td.SampleDesc.Count = 1;
td.SampleDesc.Quality = 0;
td.Usage = D3D11_USAGE_DYNAMIC;
td.Width = 500;

HR(device->CreateTexture2D(&td, 0, &m_texture));

D3D11_MAPPED_SUBRESOURCE mappedResource;
HR(dc->Map(m_texture, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource));

BYTE* mappedData = reinterpret_cast<BYTE*>(mappedResource.pData);
for(UINT i = 0; i < m_buffer.height; ++i)
{
memcpy(mappedData, m_buffer.buffer, m_buffer.rowspan);
mappedData += mappedResource.RowPitch;
m_buffer.buffer += m_buffer.rowspan;
}

dc->Unmap(m_texture, 0);
[/Code]
And I am getting the "already mapped error." Now I am really confused. How can it be already mapped if this the first and only map call I am making. To quote msdn for initializing a dynamic texture
[Quote]

[b]Dynamic Usage[/b]
To fill a dynamic texture (one created with D3D11_USAGE_DYNAMIC):

[list=1][*]Get a pointer to the texture memory by passing in D3D11_MAP_WRITE_DISCARD when calling [url="http://msdn.microsoft.com/en-us/library/ff476457%28v=vs.85%29.aspx"][b]ID3D11DeviceContext::Map[/b][/url].[*]Write data to the memory.[*]Call [url="http://msdn.microsoft.com/en-us/library/ff476485%28v=vs.85%29.aspx"][b]ID3D11DeviceContext::Unmap[/b][/url] when you are finished writing data[/list]
[/Quote]

Thats exactly what you guys are telling me and what I am doing haha.
Could it be possible that I am initializing my devices incorrectly?

Edit:
Tried it on a different computer and also got out of memory error, so pretty obvious now that im doing something wrong haha.

Share this post


Link to post
Share on other sites
Well I figured out what the problem was. It was my HR macro that I was using around the map call.


[Code]

#define HR(x) \
{ \
HRESULT hr = (x); \
if(FAILED(x)) \
{ \
DXTrace(__FILE__, (DWORD)__LINE__, hr, L#x, true); \
} \
}
[/Code]

No Idea why this was causing the issue with map, but everything seems to work once i removed it.

Share this post


Link to post
Share on other sites
[quote name='Sturmh' timestamp='1311009253' post='4836886']
Well I figured out what the problem was. It was my HR macro that I was using around the map call.


[Code]

#define HR(x) \
{ \
HRESULT hr = (x); \
if(FAILED(x)) \
{ \
DXTrace(__FILE__, (DWORD)__LINE__, hr, L#x, true); \
} \
}
[/Code]

No Idea why this was causing the issue with map, but everything seems to work once i removed it.
[/quote]
Because [url="http://www.parashift.com/c++-faq-lite/inline-functions.html#faq-9.5"]macros are evil[/url]. Your macro was calling map() at least twice in that 'function' (i.e. it's not doing what you intuitively think it should be doing).

Cheers
Dark Sylinc

Share this post


Link to post
Share on other sites
Yeah your macro would expand to this if you looked at the preprocessed version:
[code]
HRESULT hr = deviceContext->Map(m_matrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResources);
if(FAILED(deviceContext->Map(m_matrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResources)))
{
DXTrace(__FILE__, (DWORD)__LINE__, hr, L#x, true);
}
[/code]

Share this post


Link to post
Share on other sites

This topic is 2344 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Forum Statistics

    • Total Topics
      628754
    • Total Posts
      2984518
  • Similar Content

    • By GreenGodDiary
      Having some issues with a geometry shader in a very basic DX app.
      We have an assignment where we are supposed to render a rotating textured quad, and in the geometry shader duplicate this quad and offset it by its normal. Very basic stuff essentially.
      My issue is that the duplicated quad, when rendered in front of the original quad, seems to fail the Z test and thus the original quad is rendered on top of it.
      Whats even weirder is that this only happens for one of the triangles in the duplicated quad, against one of the original quads triangles.

      Here's a video to show you what happens: Video (ignore the stretched textures)

      Here's my GS: (VS is simple passthrough shader and PS is just as basic)
      struct VS_OUT { float4 Pos : SV_POSITION; float2 UV : TEXCOORD; }; struct VS_IN { float4 Pos : POSITION; float2 UV : TEXCOORD; }; cbuffer cbPerObject : register(b0) { float4x4 WVP; }; [maxvertexcount(6)] void main( triangle VS_IN input[3], inout TriangleStream< VS_OUT > output ) { //Calculate normal float4 faceEdgeA = input[1].Pos - input[0].Pos; float4 faceEdgeB = input[2].Pos - input[0].Pos; float3 faceNormal = normalize(cross(faceEdgeA.xyz, faceEdgeB.xyz)); //Input triangle, transformed for (uint i = 0; i < 3; i++) { VS_OUT element; VS_IN vert = input[i]; element.Pos = mul(vert.Pos, WVP); element.UV = vert.UV; output.Append(element); } output.RestartStrip(); for (uint j = 0; j < 3; j++) { VS_OUT element; VS_IN vert = input[j]; element.Pos = mul(vert.Pos + float4(faceNormal, 0.0f), WVP); element.Pos.xyz; element.UV = vert.UV; output.Append(element); } }  
      I havent used geometry shaders much so im not 100% on what happens behind the scenes.
      Any tips appreciated! 
    • By mister345
      Hi, I'm building a game engine using DirectX11 in c++.
      I need a basic physics engine to handle collisions and motion, and no time to write my own.
      What is the easiest solution for this? Bullet and PhysX both seem too complicated and would still require writing my own wrapper classes, it seems. 
      I found this thing called PAL - physics abstraction layer that can support bullet, physx, etc, but it's so old and no info on how to download or install it.
      The simpler the better. Please let me know, thanks!
    • By Hexaa
      I try to draw lines with different thicknesses using the geometry shader approach from here:
      https://forum.libcinder.org/topic/smooth-thick-lines-using-geometry-shader
      It seems to work great on my development machine (some Intel HD). However, if I try it on my target (Nvidia NVS 300, yes it's old) I get different results. See the attached images. There
      seem to be gaps in my sine signal that the NVS 300 device creates, the intel does what I want and expect in the other picture.
      It's a shame, because I just can't figure out why. I expect it to be the same. I get no Error in the debug output, with enabled native debugging. I disabled culling with CullMode.None. Could it be some z-fighting? I have little clue about it but I tested to play around with the RasterizerStateDescription and DepthBias properties with no success, no change at all. Maybe I miss something there?
      I develop the application with SharpDX btw.
      Any clues or help is very welcome
       


    • By Beny Benz
      Hi,
      I'm currently trying to write a shader which shoud compute a fast fourier transform of some data, manipulating the transformed data, do an inverse FFT an then displaying the result as vertex offset and color. I use Unity3d and HLSL as shader language. One of the main problems is that the data should not be passed from CPU to GPU for every frame if possible. My original plan was to use a vertex shader and do the fft there, but I fail to find out how to store changing data betwen shader calls/passes. I found a technique called ping-ponging which seems to be based on writing and exchangeing render targets, but I couldn't find an example for HLSL as a vertex shader yet.
      I found https://social.msdn.microsoft.com/Forums/en-US/c79a3701-d028-41d9-ad74-a2b3b3958383/how-to-render-to-multiple-render-targets-in-hlsl?forum=xnaframework
      which seem to use COLOR0 and COLOR1 as such render targets.
      Is it even possible to do such calculations on the gpu only? (/in this shader stage?, because I need the result of the calculation to modify the vertex offsets there)
      I also saw the use of compute shaders in simmilar projects (ocean wave simulation), do they realy copy data between CPU / GPU for every frame?
      How does this ping-ponging / rendertarget switching technique work in HLSL?
      Have you seen an example of usage?
      Any answer would be helpfull.
      Thank you
      appswert
    • By ADDMX
      Hi
      Just a simple question about compute shaders (CS5, DX11).
      Do the atomic operations (InterlockedAdd in my case) should work without any issues on RWByteAddressBuffer and be globaly coherent ?
      I'v come back from CUDA world and commited fairly simple kernel that does some job, the pseudo-code is as follows:
      (both kernels use that same RWByteAddressBuffer)
      first kernel does some job and sets Result[0] = 0;
      (using Result.Store(0, 0))
      I'v checked with debugger, and indeed the value stored at dword 0 is 0
      now my second kernel
      RWByteAddressBuffer Result;  [numthreads(8, 8, 8)] void main() {     for (int i = 0; i < 5; i++)     {         uint4 v0 = DoSomeCalculations1();         uint4 v1 = DoSomeCalculations2();         uint4 v2 = DoSomeCalculations3();                  if (v0.w == 0 && v1.w == 0 && v2.w)             continue;         //    increment counter by 3, and get it previous value         // this should basically allocate space for 3 uint4 values in buffer         uint prev;         Result.InterlockedAdd(0, 3, prev);                  // this fills the buffer with 3 uint4 values (+1 is here as the first 16 bytes is occupied by DrawInstancedIndirect data)         Result.Store4((prev+0+1)*16, v0);         Result.Store4((prev+1+1)*16, v1);         Result.Store4((prev+2+1)*16, v2);     } } Now I invoke it with Dispatch(4,4,4)
      Now I use DrawInstancedIndirect to draw the buffer, but ocassionaly there is missed triangle here and there for a frame, as if the atomic counter does not work as expected
      do I need any additional synchronization there ?
      I'v tried 'AllMemoryBarrierWithGroupSync' at the end of kernel, but without effect.
      If I do not use atomic counter, and istead just output empty vertices (that will transform into degenerated triangles) the all is OK - as if I'm missing some form of synchronization, but I do not see such a thing in DX11.
      I'v tested on both old and new nvidia hardware (680M and 1080, the behaviour is that same).
       
  • Popular Now