2 * Copyright © 2014 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
25 #ifndef GEN6_GS_VISITOR_H
26 #define GEN6_GS_VISITOR_H
29 #include "brw_vec4_gs_visitor.h"
35 class gen6_gs_visitor
: public vec4_gs_visitor
38 gen6_gs_visitor(const struct brw_compiler
*comp
,
40 struct brw_gs_compile
*c
,
41 struct brw_gs_prog_data
*prog_data
,
42 struct gl_program
*prog
,
43 const nir_shader
*shader
,
46 int shader_time_index
) :
47 vec4_gs_visitor(comp
, log_data
, c
, prog_data
, shader
, mem_ctx
, no_spills
,
54 virtual void emit_prolog();
55 virtual void emit_thread_end();
56 virtual void gs_emit_vertex(int stream_id
);
57 virtual void gs_end_primitive();
58 virtual void emit_urb_write_header(int mrf
);
59 virtual void emit_urb_write_opcode(bool complete
,
63 virtual void setup_payload();
67 void xfb_program(unsigned vertex
, unsigned num_verts
);
69 int get_vertex_output_offset_for_varying(int vertex
, int varying
);
71 const struct gl_program
*prog
;
73 src_reg vertex_output
;
74 src_reg vertex_output_offset
;
80 /* Transform Feedback members */
81 src_reg sol_prim_written
;
84 src_reg destination_indices
;
89 #endif /* __cplusplus */
91 #endif /* GEN6_GS_VISITOR_H */