kolibrios/drivers/video/Gallium/auxiliary/draw/draw_prim_assembler.h
Sergey Semyonov (Serge) edb28b33f3 Gallium 3D: initial commit
git-svn-id: svn://kolibrios.org@3770 a494cfbc-eb01-0410-851d-a64ba20cac60
2013-07-06 10:06:47 +00:00

63 lines
2.7 KiB
C

/**************************************************************************
*
* Copyright 2013 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
/*
* Input assembler needs to be able to decompose adjacency primitives
* into something that can be understood by the rest of the pipeline.
* The specs say that the adjacency primitives are *only* visible
* in the geometry shader, for everything else they need to be
* decomposed. Which in most of the cases is not an issue, because the
* geometry shader always decomposes them for us, but without geometry
* shader we were passing unchanged adjacency primitives to the
* rest of the pipeline and causing crashes everywhere.
* If geometry shader is missing and the input primitive is one of
* the adjacency primitives we use the code from this file to
* decompose them into something that the rest of the pipeline can
* understand.
*
*/
#ifndef DRAW_PRIM_ASSEMBLER_H
#define DRAW_PRIM_ASSEMBLER_H
#include "draw/draw_private.h"
boolean
draw_prim_assembler_is_required(const struct draw_context *draw,
const struct draw_prim_info *prim_info,
const struct draw_vertex_info *vert_info);
void
draw_prim_assembler_run(struct draw_context *draw,
const struct draw_prim_info *in_prim_info,
const struct draw_vertex_info *in_vert_info,
struct draw_prim_info *out_prim_info,
struct draw_vertex_info *out_vert_info);
#endif