summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i965simple/brw_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/i965simple/brw_state.c')
-rw-r--r--src/gallium/drivers/i965simple/brw_state.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/gallium/drivers/i965simple/brw_state.c b/src/gallium/drivers/i965simple/brw_state.c
index f746d1cc57..6744a8aa4f 100644
--- a/src/gallium/drivers/i965simple/brw_state.c
+++ b/src/gallium/drivers/i965simple/brw_state.c
@@ -32,6 +32,7 @@
#include "pipe/p_winsys.h"
#include "pipe/p_util.h"
+#include "pipe/p_inlines.h"
#include "pipe/p_shader_tokens.h"
#include "tgsi/util/tgsi_dump.h"
@@ -174,8 +175,12 @@ static void * brw_create_fs_state(struct pipe_context *pipe,
brw_fp->program = *shader;
brw_fp->id = brw_context(pipe)->program_id++;
+ tgsi_scan_shader(shader->tokens, &brw_fp->info);
+
+#if 0
brw_shader_info(shader->tokens,
- &brw_fp->info);
+ &brw_fp->info2);
+#endif
tgsi_dump(shader->tokens, 0);
@@ -210,9 +215,13 @@ static void *brw_create_vs_state(struct pipe_context *pipe,
*/
brw_vp->program = *shader;
brw_vp->id = brw_context(pipe)->program_id++;
- brw_shader_info(shader->tokens,
- &brw_vp->info);
+ tgsi_scan_shader(shader->tokens, &brw_vp->info);
+
+#if 0
+ brw_shader_info(shader->tokens,
+ &brw_vp->info2);
+#endif
tgsi_dump(shader->tokens, 0);
return (void *)brw_vp;
@@ -327,7 +336,8 @@ static void brw_set_sampler_texture(struct pipe_context *pipe,
{
struct brw_context *brw = brw_context(pipe);
- brw->attribs.Texture[unit] = (struct brw_texture*)texture; /* ptr, not struct */
+ pipe_texture_reference((struct pipe_texture **) &brw->attribs.Texture[unit],
+ texture);
brw->state.dirty.brw |= BRW_NEW_TEXTURE;
}