Jump to content

  • Log In with Google      Sign In   
  • Create Account


Cube drawn on the first frame only


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Nanook   Members   -  Reputation: 504

Like
0Likes
Like

Posted 08 September 2012 - 06:56 PM

I have a basic directx renderer that was working, but after doing some refactoring and moving to directx 11.1 I'm having some trouble.. I'm not exactly sure what I've changed or if its the directx 11.1 changes causing it..

When I run the application I see its drawing my cube really quick before it goes away again and I can also see it briefly if I put the rendering window down and then up again..

I'm getting these warnings and as you can see its some extra warnings on the second frame only(I've added in the comments). I think I used to have the sampler warning when it was working too.

//first DrawIndexed call (first frame)
D3D11 WARNING: ID3D11DeviceContext::DrawIndexed: The Pixel Shader unit expects a Sampler to be set at Slot 0, but none is bound. This is perfectly valid, as a NULL Sampler maps to default Sampler state. However, the developer may not want to rely on the defaults.  [ EXECUTION WARNING #352: DEVICE_DRAW_SAMPLER_NOT_SET]
//second DrawIndexed call (second frame)
D3D11 WARNING: ID3D11DeviceContext::DrawIndexed: The Pixel Shader unit expects a Sampler to be set at Slot 0, but none is bound. This is perfectly valid, as a NULL Sampler maps to default Sampler state. However, the developer may not want to rely on the defaults.  [ EXECUTION WARNING #352: DEVICE_DRAW_SAMPLER_NOT_SET]
D3D11 WARNING: ID3D11DeviceContext::DrawIndexed: The Pixel Shader expects a Render Target View bound to slot 0, but the Render Target View was unbound during a call to Present. A successful Present call for DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL SwapChains unbinds backbuffer 0 from all GPU writeable bind points.  [ EXECUTION WARNING #3146082: DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET_DUE_TO_FLIP_PRESENT]
D3D11 WARNING: ID3D11DeviceContext::DrawIndexed: The Pixel Shader expects a Render Target View bound to slot 0, but none is bound. This is OK, as writes of an unbound Render Target View are discarded. It is also possible the developer knows the data will not be used anyway. This is only a problem if the developer actually intended to bind a Render Target View here. [ EXECUTION WARNING #3146081: DEVICE_DRAW_RENDERTARGETVIEW_NOT_SET]
The thread 0x138 has exited with code 0 (0x0).
//Third DrawIndexed call (third frame)
D3D11 WARNING: ID3D11DeviceContext::DrawIndexed: The Pixel Shader unit expects a Sampler to be set at Slot 0, but none is bound. This is perfectly valid, as a NULL Sampler maps to default Sampler state. However, the developer may not want to rely on the defaults.  [ EXECUTION WARNING #352: DEVICE_DRAW_SAMPLER_NOT_SET]
D3D11 WARNING: ID3D11DeviceContext::DrawIndexed: The Pixel Shader unit expects a Sampler to be set at Slot 0, but none is bound. This is perfectly valid, as a NULL Sampler maps to default Sampler state. However, the developer may not want to rely on the defaults.  [
//Fourth DrawIndexed call (fourth frame)
EXECUTION WARNING #352: DEVICE_DRAW_SAMPLER_NOT_SET]
D3D11 WARNING: ID3D11DeviceContext::DrawIndexed: The Pixel Shader unit expects a Sampler to be set at Slot 0, but none is bound. This is perfectly valid, as a NULL Sampler maps to default Sampler state. However, the developer may not want to rely on the defaults.  [ .
.
.

What can be causing this?

Sponsor:

#2 Tsus   Members   -  Reputation: 1023

Like
1Likes
Like

Posted 09 September 2012 - 04:07 AM

Hi!

It looks like you are using the flip-model for your swap chain. There are a few remarks on it in the MSDN docs.

If you don’t really need the flip-model (i.e. you don’t build an app for the windows store and don’t mix with GDI content), it should be possible to build the swap chain with the DXGI_SWAP_EFFECT_DISCARD flag and all should behave as usual.

That’s pretty much all the help I can give you, since I haven’t ported anything to Dx11.1 yet.
If you figure it out, please let us know the solution. It would interest me as well. Posted Image

Good luck and best regards!

Acagamics e.V. – IGDA Student Game Development Club (University of Magdeburg, Germany)


#3 Nanook   Members   -  Reputation: 504

Like
0Likes
Like

Posted 09 September 2012 - 05:26 AM

Sweet that did it :) I also had to set the scaling of the DXGI_SWAP_CHAIN_DESC1 to DXGI_SCALING_STRETCH..




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS