Skip to main content
gamedev.net
🔒 Locked

Geometry shader patchlist input?

Started by Husbj Aug 8, 2014 at 11:30 AM 1 replies 2.5k views
Original Post
Husbj
Husbj

I just ran into somewhat of a snag trying to send a D3D11_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST indiced mesh through a geometry shader stage. Apparently judging by the produced error message, the GS stage needs a geometry specifier preceding the input array. Now, looking those up, it would seem the only valid patch input to the GS is either point (1 vertex), line (2 vertices), triangle (3 vertices), lineadj (2 base and 2 adjacent vertices) or triangleadj (3 normal and 3 base vertices).

Does this mean that the geometry shader can in fact only be used with point, line or triangle topologies? My intent was to produce the final geometry based on sets of control points patches.

Nik02
Nik02

This is true.

Note that the pipeline is designed so that the geometry shader is (at least conceptually) after the tessellator and just before rasterization, so it can only handle simple primitives.

Could you use the tessellator instead of GS? This would only require that the patch can be parametrized across a line, a triangle or a quad (and of course, that your target GPU can handle it).

Niko Suni
Husbj
Husbj

Ah, I see...

I'm going to have to rethink my approach then, it is possible it could be solved using tessellation, however I had hoped for shader model 4 support. Maybe I can use a pre-processing step where a buffer resource is created to store the desired adjacency data that can then be made available to the GS in subsequent steps.

Thanks!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.