i965/gen6/gs: Enable texture units and upload sampler state.
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 30 Jul 2014 07:08:48 +0000 (09:08 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Fri, 19 Sep 2014 13:01:16 +0000 (15:01 +0200)
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_state_upload.c
src/mesa/drivers/dri/i965/gen6_sampler_state.c

index 619f2d56a57fbee3bd5c618352a3b4dd73b52d66..5e2f175bddef8bda3a785ffc04d553d5b9946795 100644 (file)
@@ -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;
index c0b3c8b284b7c6bd069e985cda4ec5970cc5788d..49034a374b9fc68c0b9ab01c0fec99f92b1a8b4c 100644 (file)
@@ -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,
 
index 981e98fc8bb127bc65e24cfa8b9695c94ac8e939..9c6c508fb73d75242d0241d42265f1d85ba28bd3 100644 (file)
@@ -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();
 }