static boolean is_position_output( struct brw_vs_compile *c,
unsigned vs_output )
{
- struct brw_vertex_shader *vs = c->vp;
-
- if (vs_output == c->prog_data.output_edgeflag) {
- return FALSE;
- }
- else {
- unsigned semantic = vs->info.output_semantic_name[vs_output];
- unsigned index = vs->info.output_semantic_index[vs_output];
+ const struct brw_vertex_shader *vs = c->vp;
+ unsigned semantic = vs->info.output_semantic_name[vs_output];
+ unsigned index = vs->info.output_semantic_index[vs_output];
- return (semantic == TGSI_SEMANTIC_POSITION &&
- index == 0);
- }
+ return (semantic == TGSI_SEMANTIC_POSITION &&
+ index == 0);
}
unsigned vs_output,
unsigned *fs_input_slot )
{
- struct brw_vertex_shader *vs = c->vp;
-
- if (vs_output == c->prog_data.output_edgeflag) {
- *fs_input_slot = c->key.fs_signature.nr_inputs;
- return TRUE;
- }
- else {
- unsigned semantic = vs->info.output_semantic_name[vs_output];
- unsigned index = vs->info.output_semantic_index[vs_output];
- unsigned i;
+ const struct brw_vertex_shader *vs = c->vp;
+ unsigned semantic = vs->info.output_semantic_name[vs_output];
+ unsigned index = vs->info.output_semantic_index[vs_output];
+ unsigned i;
- for (i = 0; i < c->key.fs_signature.nr_inputs; i++) {
- if (c->key.fs_signature.input[i].semantic == semantic &&
+ for (i = 0; i < c->key.fs_signature.nr_inputs; i++) {
+ if (c->key.fs_signature.input[i].semantic == semantic &&
c->key.fs_signature.input[i].semantic_index == index) {
- *fs_input_slot = i;
- return TRUE;
- }
+ *fs_input_slot = i;
+ return TRUE;
}
}
}
+#if 0
/* TODO: relative addressing!
*/
}
}
+#endif
+
/**
* Indirect addressing: get reg[[arg] + offset].
int i;
GLuint len_vertext_header = 2;
- if (c->key.copy_edgeflag) {
- brw_MOV(p,
- get_reg(c, TGSI_FILE_OUTPUT, c->prog_data.output_edgeflag),
- brw_imm_f(1));
- }
-
/* Build ndc coords */
ndc = get_tmp(c);
/* ndc = 1.0 / pos.w */