summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2014-07-30 09:08:48 +0200
committerIago Toral Quiroga <[email protected]>2014-09-19 15:01:16 +0200
commit66ec61c49f0e57ebe237de3ee5610c7fda972e9c (patch)
tree8c10c4c47a8096be4d44c1d20f6c0abe58b750f2 /src/mesa/drivers
parent6669fd0818a07f3bd8232ee72cf5e01d992b39f2 (diff)
i965/gen6/gs: Enable texture units and upload sampler state.
Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c2
-rw-r--r--src/mesa/drivers/dri/i965/brw_state_upload.c1
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sampler_state.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 619f2d56a57..5e2f175bdde 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -325,7 +325,7 @@ brw_initialize_context_constants(struct brw_context *brw)
MIN2(ctx->Const.MaxTextureCoordUnits,
ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits);
ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits = max_samplers;
- if (brw->gen >= 7)
+ if (brw->gen >= 6)
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits = max_samplers;
else
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits = 0;
diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index c0b3c8b284b..49034a374b9 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -147,6 +147,7 @@ static const struct brw_tracked_state *gen6_atoms[] =
&brw_fs_samplers,
&brw_vs_samplers,
+ &brw_gs_samplers,
&gen6_sampler_state,
&gen6_multisample_state,
diff --git a/src/mesa/drivers/dri/i965/gen6_sampler_state.c b/src/mesa/drivers/dri/i965/gen6_sampler_state.c
index 981e98fc8bb..9c6c508fb73 100644
--- a/src/mesa/drivers/dri/i965/gen6_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sampler_state.c
@@ -40,7 +40,7 @@ upload_sampler_state_pointers(struct brw_context *brw)
PS_SAMPLER_STATE_CHANGE |
(4 - 2));
OUT_BATCH(brw->vs.base.sampler_offset); /* VS */
- OUT_BATCH(0); /* GS */
+ OUT_BATCH(brw->gs.base.sampler_offset); /* GS */
OUT_BATCH(brw->wm.base.sampler_offset);
ADVANCE_BATCH();
}