rendy icon indicating copy to clipboard operation
rendy copied to clipboard

rendy silently allows binding to, drawing from slots with no vertex format specified

Open cormac-obrien opened this issue 6 years ago • 2 comments

To reproduce, edit the triangle example and remove the implementation of TriangleRenderPipelineDesc::vertices (so that the default implementation is used).

The example still compiles, runs and issues no warnings, but does not render the triangle. Because no vertex format has been specified, the shader fails to pull any data from the vertex buffer.

This should probably at least be checked in debug builds, and documented for this and any other descriptor method(s) that might be susceptible to the same problem.

cormac-obrien avatar Jun 21 '19 01:06 cormac-obrien

Are you running with the validation layers? If you set the environment variable RUST_LOG=info then it should show validation layer output when running. When I have tried to experiment with similar things it usually runs, but the validation layers outputs either errors or warnings. In this case I think it will output an error saying that the shader requires some input, but it is not being provided.

HalfVoxel avatar Jul 10 '19 10:07 HalfVoxel

@cormac-obrien Do you mean that rendy should check that you create pipeline with vertex format compatible with vertex attributes declared in shader code? If so, this is possible with shader-reflection feature enabled, but not implemented yet.

zakarumych avatar Jul 10 '19 11:07 zakarumych