We can just get this information from shader_info instead.
Note that passing gen6_gs_visitor() gl_program via _LinkedShaders
will go away in a later patch.
Reviewed-by: Eric Anholt <eric@anholt.net>
int invocations;
- /**
- * Gen6 transform feedback enabled flag.
- */
- bool gen6_xfb_enabled;
-
/**
* Gen6: Provoking vertex convention for odd-numbered triangles
* in tristrips.
} else {
/* There are no control data bits in gen6. */
c.control_data_bits_per_vertex = 0;
-
- /* If it is using transform feedback, enable it */
- if (shader->info->has_transform_feedback_varyings)
- prog_data->gen6_xfb_enabled = true;
- else
- prog_data->gen6_xfb_enabled = false;
}
c.control_data_header_size_bits =
shader->info->gs.vertices_out * c.control_data_bits_per_vertex;
shader_time_index);
else
gs = new gen6_gs_visitor(compiler, log_data, &c, prog_data, shader_prog,
+ shader_prog->_LinkedShaders[MESA_SHADER_GEOMETRY]->Program,
shader, mem_ctx, false /* no_spills */,
shader_time_index);
const struct brw_stage_prog_data *prog_data = stage_state->prog_data;
const struct brw_vue_prog_data *vue_prog_data =
brw_vue_prog_data(stage_state->prog_data);
- const struct brw_gs_prog_data *gs_prog_data =
- brw_gs_prog_data(stage_state->prog_data);
if (!active || stage_state->push_const_size == 0) {
/* Disable the push constant buffers. */
GEN6_GS_SO_STATISTICS_ENABLE |
GEN6_GS_RENDERING_ENABLE);
- if (gs_prog_data->gen6_xfb_enabled) {
+ if (brw->geometry_program->info.has_transform_feedback_varyings) {
/* GEN6_GS_REORDER is equivalent to GEN7_GS_REORDER_TRAILING
* in gen7. SNB and IVB specs are the same regarding the reordering of
* TRISTRIP/TRISTRIP_REV vertices and triangle orientation, so we do
this->prim_count = src_reg(this, glsl_type::uint_type);
emit(MOV(dst_reg(this->prim_count), brw_imm_ud(0u)));
- if (gs_prog_data->gen6_xfb_enabled) {
+ if (prog->info.has_transform_feedback_varyings) {
/* Create a virtual register to hold destination indices in SOL */
this->destination_indices = src_reg(this, glsl_type::uvec4_type);
/* Create a virtual register to hold number of written primitives */
this->current_annotation = "gen6 thread end: ff_sync";
vec4_instruction *inst;
- if (gs_prog_data->gen6_xfb_enabled) {
+ if (prog->info.has_transform_feedback_varyings) {
src_reg sol_temp(this, glsl_type::uvec4_type);
emit(GS_OPCODE_FF_SYNC_SET_PRIMITIVES,
dst_reg(this->svbi),
}
emit(BRW_OPCODE_WHILE);
- if (gs_prog_data->gen6_xfb_enabled)
+ if (prog->info.has_transform_feedback_varyings)
xfb_write();
}
emit(BRW_OPCODE_ENDIF);
*/
this->current_annotation = "gen6 thread end: EOT";
- if (gs_prog_data->gen6_xfb_enabled) {
+ if (prog->info.has_transform_feedback_varyings) {
/* When emitting EOT, set SONumPrimsWritten Increment Value. */
src_reg data(this, glsl_type::uint_type);
emit(AND(dst_reg(data), this->sol_prim_written, brw_imm_ud(0xffffu)));
void *log_data,
struct brw_gs_compile *c,
struct brw_gs_prog_data *prog_data,
- struct gl_shader_program *prog,
+ struct gl_shader_program *sh_prog,
+ struct gl_program *prog,
const nir_shader *shader,
void *mem_ctx,
bool no_spills,
int shader_time_index) :
vec4_gs_visitor(comp, log_data, c, prog_data, shader, mem_ctx, no_spills,
shader_time_index),
- shader_prog(prog)
+ shader_prog(sh_prog),
+ prog(prog)
{
}
int get_vertex_output_offset_for_varying(int vertex, int varying);
const struct gl_shader_program *shader_prog;
+ const struct gl_program *prog;
src_reg vertex_output;
src_reg vertex_output_offset;