summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i965/brw_pipe_shader.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-11-06 10:24:19 +0000
committerKeith Whitwell <keithw@vmware.com>2009-11-06 10:24:19 +0000
commit212fb8adbd0e5e28a5d20b0cc03cde46df2831f4 (patch)
tree2aaa9b29a1ec4eac62d5893d56c701d23c5ea13c /src/gallium/drivers/i965/brw_pipe_shader.c
parent1d6b5957c6be221feb836bc25686246f67769bce (diff)
i965g: don't set up vs stack register for non-branching shaders
Diffstat (limited to 'src/gallium/drivers/i965/brw_pipe_shader.c')
-rw-r--r--src/gallium/drivers/i965/brw_pipe_shader.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gallium/drivers/i965/brw_pipe_shader.c b/src/gallium/drivers/i965/brw_pipe_shader.c
index 662c43c3e5..44f9ad6f9c 100644
--- a/src/gallium/drivers/i965/brw_pipe_shader.c
+++ b/src/gallium/drivers/i965/brw_pipe_shader.c
@@ -43,15 +43,15 @@
* Determine if the given shader uses complex features such as flow
* conditionals, loops, subroutines.
*/
-GLboolean brw_wm_has_flow_control(const struct brw_fragment_shader *fp)
+static GLboolean has_flow_control(const struct tgsi_shader_info *info)
{
- return (fp->info.opcode_count[TGSI_OPCODE_ARL] > 0 ||
- fp->info.opcode_count[TGSI_OPCODE_IF] > 0 ||
- fp->info.opcode_count[TGSI_OPCODE_ENDIF] > 0 || /* redundant - IF */
- fp->info.opcode_count[TGSI_OPCODE_CAL] > 0 ||
- fp->info.opcode_count[TGSI_OPCODE_BRK] > 0 || /* redundant - BGNLOOP */
- fp->info.opcode_count[TGSI_OPCODE_RET] > 0 || /* redundant - CAL */
- fp->info.opcode_count[TGSI_OPCODE_BGNLOOP] > 0);
+ return (info->opcode_count[TGSI_OPCODE_ARL] > 0 ||
+ info->opcode_count[TGSI_OPCODE_IF] > 0 ||
+ info->opcode_count[TGSI_OPCODE_ENDIF] > 0 || /* redundant - IF */
+ info->opcode_count[TGSI_OPCODE_CAL] > 0 ||
+ info->opcode_count[TGSI_OPCODE_BRK] > 0 || /* redundant - BGNLOOP */
+ info->opcode_count[TGSI_OPCODE_RET] > 0 || /* redundant - CAL */
+ info->opcode_count[TGSI_OPCODE_BGNLOOP] > 0);
}
@@ -88,7 +88,7 @@ static void *brw_create_fs_state( struct pipe_context *pipe,
/* Duplicate tokens, scan shader
*/
fs->id = brw->program_id++;
- fs->has_flow_control = brw_wm_has_flow_control(fs);
+ fs->has_flow_control = has_flow_control(&fs->info);
fs->tokens = tgsi_dup_tokens(shader->tokens);
if (fs->tokens == NULL)
@@ -126,7 +126,7 @@ static void *brw_create_vs_state( struct pipe_context *pipe,
/* Duplicate tokens, scan shader
*/
vs->id = brw->program_id++;
- //vs->has_flow_control = brw_wm_has_flow_control(vs);
+ vs->has_flow_control = has_flow_control(&vs->info);
vs->tokens = tgsi_dup_tokens(shader->tokens);
if (vs->tokens == NULL)