1 /************************************************************************** 2 * 3 * Copyright 2013 VMware, Inc. 4 * All Rights Reserved. 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the 8 * "Software"), to deal in the Software without restriction, including 9 * without limitation the rights to use, copy, modify, merge, publish, 10 * distribute, sub license, and/or sell copies of the Software, and to 11 * permit persons to whom the Software is furnished to do so, subject to 12 * the following conditions: 13 * 14 * The above copyright notice and this permission notice (including the 15 * next paragraph) shall be included in all copies or substantial portions 16 * of the Software. 17 * 18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 21 * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR 22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 * 26 **************************************************************************/ 27 28 /* 29 * Input assembler needs to be able to decompose adjacency primitives 30 * into something that can be understood by the rest of the pipeline. 31 * The specs say that the adjacency primitives are *only* visible 32 * in the geometry shader, for everything else they need to be 33 * decomposed. Which in most of the cases is not an issue, because the 34 * geometry shader always decomposes them for us, but without geometry 35 * shader we were passing unchanged adjacency primitives to the 36 * rest of the pipeline and causing crashes everywhere. 37 * If geometry shader is missing and the input primitive is one of 38 * the adjacency primitives we use the code from this file to 39 * decompose them into something that the rest of the pipeline can 40 * understand. 41 * 42 */ 43 44 #ifndef DRAW_PRIM_ASSEMBLER_H 45 #define DRAW_PRIM_ASSEMBLER_H 46 47 #include "draw/draw_private.h" 48 49 struct draw_assembler; 50 51 struct draw_assembler * 52 draw_prim_assembler_create(struct draw_context *draw); 53 54 void 55 draw_prim_assembler_destroy(struct draw_assembler *ia); 56 57 boolean 58 draw_prim_assembler_is_required(const struct draw_context *draw, 59 const struct draw_prim_info *prim_info, 60 const struct draw_vertex_info *vert_info); 61 62 void 63 draw_prim_assembler_run(struct draw_context *draw, 64 const struct draw_prim_info *in_prim_info, 65 const struct draw_vertex_info *in_vert_info, 66 struct draw_prim_info *out_prim_info, 67 struct draw_vertex_info *out_vert_info); 68 69 70 void 71 draw_prim_assembler_prepare_outputs(struct draw_assembler *ia); 72 73 void 74 draw_prim_assembler_new_instance(struct draw_assembler *ia); 75 76 77 #endif 78