14a49301eSmrg/* 24a49301eSmrg * Copyright 2009 Corbin Simpson <MostAwesomeDude@gmail.com> 3cdc920a0Smrg * Copyright 2009 Marek Olšák <maraeo@gmail.com> 44a49301eSmrg * 54a49301eSmrg * Permission is hereby granted, free of charge, to any person obtaining a 64a49301eSmrg * copy of this software and associated documentation files (the "Software"), 74a49301eSmrg * to deal in the Software without restriction, including without limitation 84a49301eSmrg * on the rights to use, copy, modify, merge, publish, distribute, sub 94a49301eSmrg * license, and/or sell copies of the Software, and to permit persons to whom 104a49301eSmrg * the Software is furnished to do so, subject to the following conditions: 114a49301eSmrg * 124a49301eSmrg * The above copyright notice and this permission notice (including the next 134a49301eSmrg * paragraph) shall be included in all copies or substantial portions of the 144a49301eSmrg * Software. 154a49301eSmrg * 164a49301eSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 174a49301eSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 184a49301eSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 194a49301eSmrg * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, 204a49301eSmrg * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 214a49301eSmrg * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 224a49301eSmrg * USE OR OTHER DEALINGS IN THE SOFTWARE. */ 234a49301eSmrg 244a49301eSmrg#ifndef R300_VS_H 254a49301eSmrg#define R300_VS_H 264a49301eSmrg 274a49301eSmrg#include "pipe/p_state.h" 284a49301eSmrg#include "tgsi/tgsi_scan.h" 29af69d88dSmrg#include "compiler/radeon_code.h" 304a49301eSmrg 313464ebd5Sriastradh#include "r300_context.h" 32cdc920a0Smrg#include "r300_shader_semantics.h" 33cdc920a0Smrg 344a49301eSmrgstruct r300_context; 354a49301eSmrg 364a49301eSmrgstruct r300_vertex_shader { 374a49301eSmrg /* Parent class */ 384a49301eSmrg struct pipe_shader_state state; 39cdc920a0Smrg 404a49301eSmrg struct tgsi_shader_info info; 41cdc920a0Smrg struct r300_shader_semantics outputs; 42cdc920a0Smrg 433464ebd5Sriastradh /* Whether the shader was replaced by a dummy one due to a shader 443464ebd5Sriastradh * compilation failure. */ 453464ebd5Sriastradh boolean dummy; 464a49301eSmrg 473464ebd5Sriastradh /* Numbers of constants for each type. */ 483464ebd5Sriastradh unsigned externals_count; 493464ebd5Sriastradh unsigned immediates_count; 504a49301eSmrg 513464ebd5Sriastradh /* HWTCL-specific. */ 524a49301eSmrg /* Machine code (if translated) */ 534a49301eSmrg struct r300_vertex_program_code code; 543464ebd5Sriastradh 553464ebd5Sriastradh /* SWTCL-specific. */ 563464ebd5Sriastradh void *draw_vs; 574a49301eSmrg}; 584a49301eSmrg 59af69d88dSmrgvoid r300_init_vs_outputs(struct r300_context *r300, 60af69d88dSmrg struct r300_vertex_shader *vs); 613464ebd5Sriastradh 623464ebd5Sriastradhvoid r300_translate_vertex_shader(struct r300_context *r300, 633464ebd5Sriastradh struct r300_vertex_shader *vs); 644a49301eSmrg 65af69d88dSmrgvoid r300_draw_init_vertex_shader(struct r300_context *r300, 663464ebd5Sriastradh struct r300_vertex_shader *vs); 67cdc920a0Smrg 684a49301eSmrg#endif /* R300_VS_H */ 69