i965: Rename brw_vec4_prog_data/key to brw_bue_prog_data/key
These structs aren't vec4 specific, they are shared by shader stages operating on Vertex URB Entries (VUEs). VUEs are the data structures in the URB that hold vertex data between the pipeline geometry stages. Using vue in the name instead of vec4 makes a lot more sense, especially when we add scalar vertex shader support. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -145,7 +145,7 @@ extern "C" {
|
||||
struct brw_context;
|
||||
struct brw_inst;
|
||||
struct brw_vs_prog_key;
|
||||
struct brw_vec4_prog_key;
|
||||
struct brw_vue_prog_key;
|
||||
struct brw_wm_prog_key;
|
||||
struct brw_wm_prog_data;
|
||||
|
||||
@@ -580,10 +580,10 @@ struct brw_ff_gs_prog_data {
|
||||
};
|
||||
|
||||
|
||||
/* Note: brw_vec4_prog_data_compare() must be updated when adding fields to
|
||||
/* Note: brw_vue_prog_data_compare() must be updated when adding fields to
|
||||
* this struct!
|
||||
*/
|
||||
struct brw_vec4_prog_data {
|
||||
struct brw_vue_prog_data {
|
||||
struct brw_stage_prog_data base;
|
||||
struct brw_vue_map vue_map;
|
||||
|
||||
@@ -604,7 +604,7 @@ struct brw_vec4_prog_data {
|
||||
* struct!
|
||||
*/
|
||||
struct brw_vs_prog_data {
|
||||
struct brw_vec4_prog_data base;
|
||||
struct brw_vue_prog_data base;
|
||||
|
||||
GLbitfield64 inputs_read;
|
||||
|
||||
@@ -662,7 +662,7 @@ struct brw_vs_prog_data {
|
||||
*/
|
||||
struct brw_gs_prog_data
|
||||
{
|
||||
struct brw_vec4_prog_data base;
|
||||
struct brw_vue_prog_data base;
|
||||
|
||||
/**
|
||||
* Size of an output vertex, measured in HWORDS (32 bytes).
|
||||
@@ -1872,9 +1872,9 @@ void gen8_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
|
||||
uint32_t get_hw_prim_for_gl_prim(int mode);
|
||||
|
||||
void
|
||||
brw_setup_vec4_key_clip_info(struct brw_context *brw,
|
||||
struct brw_vec4_prog_key *key,
|
||||
bool program_uses_clip_distance);
|
||||
brw_setup_vue_key_clip_info(struct brw_context *brw,
|
||||
struct brw_vue_prog_key *key,
|
||||
bool program_uses_clip_distance);
|
||||
|
||||
void
|
||||
gen6_upload_push_constants(struct brw_context *brw,
|
||||
|
||||
@@ -330,8 +330,8 @@ brw_upload_gs_prog(struct brw_context *brw)
|
||||
memset(&key, 0, sizeof(key));
|
||||
|
||||
key.base.program_string_id = gp->id;
|
||||
brw_setup_vec4_key_clip_info(brw, &key.base,
|
||||
gp->program.Base.UsesClipDistanceOut);
|
||||
brw_setup_vue_key_clip_info(brw, &key.base,
|
||||
gp->program.Base.UsesClipDistanceOut);
|
||||
|
||||
/* _NEW_TEXTURE */
|
||||
brw_populate_sampler_prog_key_data(ctx, prog, stage_state->sampler_count,
|
||||
@@ -386,7 +386,7 @@ brw_gs_precompile(struct gl_context *ctx,
|
||||
|
||||
memset(&key, 0, sizeof(key));
|
||||
|
||||
brw_vec4_setup_prog_key_for_precompile(ctx, &key.base, bgp->id, &gp->Base);
|
||||
brw_vue_setup_prog_key_for_precompile(ctx, &key.base, bgp->id, &gp->Base);
|
||||
|
||||
/* Assume that the set of varyings coming in from the vertex shader exactly
|
||||
* matches what the geometry shader requires.
|
||||
|
||||
@@ -78,7 +78,7 @@ struct brw_sampler_prog_key_data {
|
||||
};
|
||||
|
||||
|
||||
struct brw_vec4_prog_key {
|
||||
struct brw_vue_prog_key {
|
||||
unsigned program_string_id;
|
||||
|
||||
/**
|
||||
@@ -98,7 +98,7 @@ struct brw_vec4_prog_key {
|
||||
|
||||
/** The program key for Vertex Shaders. */
|
||||
struct brw_vs_prog_key {
|
||||
struct brw_vec4_prog_key base;
|
||||
struct brw_vue_prog_key base;
|
||||
|
||||
/*
|
||||
* Per-attribute workaround flags
|
||||
@@ -123,7 +123,7 @@ struct brw_vs_prog_key {
|
||||
/** The program key for Geometry Shaders. */
|
||||
struct brw_gs_prog_key
|
||||
{
|
||||
struct brw_vec4_prog_key base;
|
||||
struct brw_vue_prog_key base;
|
||||
|
||||
uint64_t input_varyings;
|
||||
};
|
||||
|
||||
@@ -1815,9 +1815,9 @@ brw_vs_emit(struct brw_context *brw,
|
||||
|
||||
|
||||
void
|
||||
brw_vec4_setup_prog_key_for_precompile(struct gl_context *ctx,
|
||||
struct brw_vec4_prog_key *key,
|
||||
GLuint id, struct gl_program *prog)
|
||||
brw_vue_setup_prog_key_for_precompile(struct gl_context *ctx,
|
||||
struct brw_vue_prog_key *key,
|
||||
GLuint id, struct gl_program *prog)
|
||||
{
|
||||
key->program_string_id = id;
|
||||
|
||||
|
||||
@@ -54,9 +54,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
void
|
||||
brw_vec4_setup_prog_key_for_precompile(struct gl_context *ctx,
|
||||
struct brw_vec4_prog_key *key,
|
||||
GLuint id, struct gl_program *prog);
|
||||
brw_vue_setup_prog_key_for_precompile(struct gl_context *ctx,
|
||||
struct brw_vue_prog_key *key,
|
||||
GLuint id, struct gl_program *prog);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
@@ -191,7 +191,7 @@ public:
|
||||
const src_reg &src2 = src_reg());
|
||||
|
||||
struct brw_reg get_dst(void);
|
||||
struct brw_reg get_src(const struct brw_vec4_prog_data *prog_data, int i);
|
||||
struct brw_reg get_src(const struct brw_vue_prog_data *prog_data, int i);
|
||||
|
||||
dst_reg dst;
|
||||
src_reg src[3];
|
||||
@@ -232,8 +232,8 @@ public:
|
||||
vec4_visitor(struct brw_context *brw,
|
||||
struct brw_vec4_compile *c,
|
||||
struct gl_program *prog,
|
||||
const struct brw_vec4_prog_key *key,
|
||||
struct brw_vec4_prog_data *prog_data,
|
||||
const struct brw_vue_prog_key *key,
|
||||
struct brw_vue_prog_data *prog_data,
|
||||
struct gl_shader_program *shader_prog,
|
||||
gl_shader_stage stage,
|
||||
void *mem_ctx,
|
||||
@@ -260,8 +260,8 @@ public:
|
||||
}
|
||||
|
||||
struct brw_vec4_compile * const c;
|
||||
const struct brw_vec4_prog_key * const key;
|
||||
struct brw_vec4_prog_data * const prog_data;
|
||||
const struct brw_vue_prog_key * const key;
|
||||
struct brw_vue_prog_data * const prog_data;
|
||||
unsigned int sanity_param_count;
|
||||
|
||||
char *fail_msg;
|
||||
@@ -587,7 +587,7 @@ public:
|
||||
vec4_generator(struct brw_context *brw,
|
||||
struct gl_shader_program *shader_prog,
|
||||
struct gl_program *prog,
|
||||
struct brw_vec4_prog_data *prog_data,
|
||||
struct brw_vue_prog_data *prog_data,
|
||||
void *mem_ctx,
|
||||
bool debug_flag);
|
||||
~vec4_generator();
|
||||
@@ -679,7 +679,7 @@ private:
|
||||
struct gl_shader_program *shader_prog;
|
||||
const struct gl_program *prog;
|
||||
|
||||
struct brw_vec4_prog_data *prog_data;
|
||||
struct brw_vue_prog_data *prog_data;
|
||||
|
||||
void *mem_ctx;
|
||||
const bool debug_flag;
|
||||
|
||||
@@ -66,7 +66,7 @@ vec4_instruction::get_dst(void)
|
||||
}
|
||||
|
||||
struct brw_reg
|
||||
vec4_instruction::get_src(const struct brw_vec4_prog_data *prog_data, int i)
|
||||
vec4_instruction::get_src(const struct brw_vue_prog_data *prog_data, int i)
|
||||
{
|
||||
struct brw_reg brw_reg;
|
||||
|
||||
@@ -136,7 +136,7 @@ vec4_instruction::get_src(const struct brw_vec4_prog_data *prog_data, int i)
|
||||
vec4_generator::vec4_generator(struct brw_context *brw,
|
||||
struct gl_shader_program *shader_prog,
|
||||
struct gl_program *prog,
|
||||
struct brw_vec4_prog_data *prog_data,
|
||||
struct brw_vue_prog_data *prog_data,
|
||||
void *mem_ctx,
|
||||
bool debug_flag)
|
||||
: brw(brw), shader_prog(shader_prog), prog(prog), prog_data(prog_data),
|
||||
|
||||
@@ -611,7 +611,7 @@ static const unsigned *
|
||||
generate_assembly(struct brw_context *brw,
|
||||
struct gl_shader_program *shader_prog,
|
||||
struct gl_program *prog,
|
||||
struct brw_vec4_prog_data *prog_data,
|
||||
struct brw_vue_prog_data *prog_data,
|
||||
void *mem_ctx,
|
||||
const cfg_t *cfg,
|
||||
unsigned *final_assembly_size)
|
||||
|
||||
@@ -3568,8 +3568,8 @@ vec4_visitor::resolve_bool_comparison(ir_rvalue *rvalue, src_reg *reg)
|
||||
vec4_visitor::vec4_visitor(struct brw_context *brw,
|
||||
struct brw_vec4_compile *c,
|
||||
struct gl_program *prog,
|
||||
const struct brw_vec4_prog_key *key,
|
||||
struct brw_vec4_prog_data *prog_data,
|
||||
const struct brw_vue_prog_key *key,
|
||||
struct brw_vue_prog_data *prog_data,
|
||||
struct gl_shader_program *shader_prog,
|
||||
gl_shader_stage stage,
|
||||
void *mem_ctx,
|
||||
|
||||
@@ -396,9 +396,9 @@ brw_vs_debug_recompile(struct brw_context *brw,
|
||||
|
||||
|
||||
void
|
||||
brw_setup_vec4_key_clip_info(struct brw_context *brw,
|
||||
struct brw_vec4_prog_key *key,
|
||||
bool program_uses_clip_distance)
|
||||
brw_setup_vue_key_clip_info(struct brw_context *brw,
|
||||
struct brw_vue_prog_key *key,
|
||||
bool program_uses_clip_distance)
|
||||
{
|
||||
struct gl_context *ctx = &brw->ctx;
|
||||
|
||||
@@ -426,8 +426,8 @@ static void brw_upload_vs_prog(struct brw_context *brw)
|
||||
* the inputs it asks for, whether they are varying or not.
|
||||
*/
|
||||
key.base.program_string_id = vp->id;
|
||||
brw_setup_vec4_key_clip_info(brw, &key.base,
|
||||
vp->program.Base.UsesClipDistanceOut);
|
||||
brw_setup_vue_key_clip_info(brw, &key.base,
|
||||
vp->program.Base.UsesClipDistanceOut);
|
||||
|
||||
/* _NEW_POLYGON */
|
||||
if (brw->gen < 6) {
|
||||
@@ -514,7 +514,7 @@ brw_vs_precompile(struct gl_context *ctx,
|
||||
|
||||
memset(&key, 0, sizeof(key));
|
||||
|
||||
brw_vec4_setup_prog_key_for_precompile(ctx, &key.base, bvp->id, &vp->Base);
|
||||
brw_vue_setup_prog_key_for_precompile(ctx, &key.base, bvp->id, &vp->Base);
|
||||
key.clamp_vertex_color =
|
||||
(prog->OutputsWritten & (VARYING_BIT_COL0 | VARYING_BIT_COL1 |
|
||||
VARYING_BIT_BFC0 | VARYING_BIT_BFC1));
|
||||
|
||||
@@ -91,7 +91,7 @@ upload_gs_state(struct brw_context *brw)
|
||||
/* BRW_NEW_GEOMETRY_PROGRAM */
|
||||
bool active = brw->geometry_program;
|
||||
/* BRW_NEW_GS_PROG_DATA */
|
||||
const struct brw_vec4_prog_data *prog_data = &brw->gs.prog_data->base;
|
||||
const struct brw_vue_prog_data *prog_data = &brw->gs.prog_data->base;
|
||||
const struct brw_stage_state *stage_state = &brw->gs.base;
|
||||
|
||||
if (!active || stage_state->push_const_size == 0) {
|
||||
|
||||
@@ -35,7 +35,7 @@ upload_gs_state(struct brw_context *brw)
|
||||
/* BRW_NEW_GEOMETRY_PROGRAM */
|
||||
bool active = brw->geometry_program;
|
||||
/* BRW_NEW_GS_PROG_DATA */
|
||||
const struct brw_vec4_prog_data *prog_data = &brw->gs.prog_data->base;
|
||||
const struct brw_vue_prog_data *prog_data = &brw->gs.prog_data->base;
|
||||
|
||||
/**
|
||||
* From Graphics BSpec: 3D-Media-GPGPU Engine > 3D Pipeline Stages >
|
||||
|
||||
@@ -34,7 +34,7 @@ gen8_upload_gs_state(struct brw_context *brw)
|
||||
/* BRW_NEW_GEOMETRY_PROGRAM */
|
||||
bool active = brw->geometry_program;
|
||||
/* BRW_NEW_GS_PROG_DATA */
|
||||
const struct brw_vec4_prog_data *prog_data = &brw->gs.prog_data->base;
|
||||
const struct brw_vue_prog_data *prog_data = &brw->gs.prog_data->base;
|
||||
|
||||
if (active) {
|
||||
int urb_entry_write_offset = 1;
|
||||
|
||||
@@ -37,7 +37,7 @@ upload_vs_state(struct brw_context *brw)
|
||||
uint32_t floating_point_mode = 0;
|
||||
|
||||
/* BRW_NEW_VS_PROG_DATA */
|
||||
const struct brw_vec4_prog_data *prog_data = &brw->vs.prog_data->base;
|
||||
const struct brw_vue_prog_data *prog_data = &brw->vs.prog_data->base;
|
||||
|
||||
if (prog_data->base.use_alt_mode)
|
||||
floating_point_mode = GEN6_VS_FLOATING_POINT_MODE_ALT;
|
||||
|
||||
Reference in New Issue
Block a user