Thank you Adam!
So, lets take an example:
I have 2 classes, that setup pipeline draw calls for rendering bounding box and vertex normals.
They use Geometry shader and different constant buffers.
Every frame each of them will bind its own constant buffer to geometry shader.
The only difference - 2x GSSetConstantBuffers(0,0,nullptr);
If I will forget to bind CB (GS CB == nullptr), I would probably have a runtime error.
If I will not unbind buffer, and will use data from previous renderer, I probably will have visual artifacts, that are harder to find than looking at error messages.
In this case it seems for me using different code paths for Debug/Release mode is not a very good idea =(
Is it possible to measure particular call penalty? (I use VS2015)
I am asking this question not because I want to improve performance in this particular Draw() call, but because I want to learn how to measure performance in DX without speculations/guessing.
BTW, I am using DX11. Would DX12 solve this problem automatically?