Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translation layer failed to create PSO for VS + SO graphics pipeline #46

Open
wuyouZen opened this issue Feb 26, 2024 · 0 comments
Open

Comments

@wuyouZen
Copy link

When runing wgf11draw Draw:1 with -11On12 option, the translation layer failed to create PSO because of invalid D3D12_GRAPHICS_PIPELINE_STATE_DESC argument.
This application only use Vertex Shader and StreamOut. It doesn't have Pixel Shader, render target and depth stencil buffer. And its Vertex Shader doesn't output a SV_POSITION value.
So in the D3D12_GRAPHICS_PIPELINE_STATE_DESC argument, the D3D12_STREAM_OUTPUT_DESC::RasterizedStream should be set to D3D12_SO_NO_RASTERIZED_STREAM, and the D3D12_DEPTH_STENCIL_DESC::DepthEnable, D3D12_DEPTH_STENCIL_DESC::StencilEnable should be set to false.
But the translation layer generates a D3D12_GRAPHICS_PIPELINE_STATE_DESC with D3D12_STREAM_OUTPUT_DESC::RasterizedStream set to 0 and D3D12_DEPTH_STENCIL_DESC::DepthEnable set to true. This result in an invalid argument error when creating PSO.
In D3D11On12::StreamOutShader::ProduceDesc, we may need to check if there is any output parameter has "SV_POSITION" semantic name. If not, we should set RasterizedStream to D3D12_SO_NO_RASTERIZED_STREAM and disable depth and stencil.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant