Patch_size must be an integral constant expression greater than zero and less than the patch limit ( see below).Īll inputs from vertex shaders to the TCS are aggregated into arrays, based on the size of the input patch. The number of vertices in the output patch is defined with an output layout qualifier: The output patch size does not have to match the input patch size. It also determines the number of TCS invocations used to compute this patch data. The output patch size is the number of vertices in the output patch. But in order to do so, they must use a synchronization mechanism to ensure that all other invocations for the patch have executed at least that far.īecause of this, it is possible for TCS invocations to share data and communicate with one another. They can read output values that other invocations for the same patch have written to. These invocations all share their output values. The different invocations that provide data to the same patch are interconnected. So if a drawing command draws 20 patches, and each output patch has 4 vertices, there will be a total of 80 separate TCS invocations. Unlike Geometry Shaders, where each invocation can output multiple primitives, each TCS invocation is only responsible for producing a single vertex of output to the output patch.įor each patch provided during rendering, n TCS shader invocations will be processed, where n is the number of vertices in the output patch. The TCS execution model is different from most other shader stages it is most similar to Compute Shaders.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |