Path: blob/21.2-virgl/src/gallium/auxiliary/draw/draw_prim_assembler.h
4565 views
/**************************************************************************1*2* Copyright 2013 VMware, Inc.3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sub license, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice (including the14* next paragraph) shall be included in all copies or substantial portions15* of the Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS18* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.20* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR21* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,22* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE23* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.24*25**************************************************************************/2627/*28* Input assembler needs to be able to decompose adjacency primitives29* into something that can be understood by the rest of the pipeline.30* The specs say that the adjacency primitives are *only* visible31* in the geometry shader, for everything else they need to be32* decomposed. Which in most of the cases is not an issue, because the33* geometry shader always decomposes them for us, but without geometry34* shader we were passing unchanged adjacency primitives to the35* rest of the pipeline and causing crashes everywhere.36* If geometry shader is missing and the input primitive is one of37* the adjacency primitives we use the code from this file to38* decompose them into something that the rest of the pipeline can39* understand.40*41*/4243#ifndef DRAW_PRIM_ASSEMBLER_H44#define DRAW_PRIM_ASSEMBLER_H4546#include "draw/draw_private.h"4748struct draw_assembler;4950struct draw_assembler *51draw_prim_assembler_create(struct draw_context *draw);5253void54draw_prim_assembler_destroy(struct draw_assembler *ia);5556boolean57draw_prim_assembler_is_required(const struct draw_context *draw,58const struct draw_prim_info *prim_info,59const struct draw_vertex_info *vert_info);6061void62draw_prim_assembler_run(struct draw_context *draw,63const struct draw_prim_info *in_prim_info,64const struct draw_vertex_info *in_vert_info,65struct draw_prim_info *out_prim_info,66struct draw_vertex_info *out_vert_info);676869void70draw_prim_assembler_prepare_outputs(struct draw_assembler *ia);7172void73draw_prim_assembler_new_instance(struct draw_assembler *ia);747576#endif777879