~ubuntu-branches/ubuntu/precise/mesa-lts-raring/precise-proposed

« back to all changes in this revision

Viewing changes to src/mesa/drivers/dri/i965/brw_vs_state.c

  • Committer: Package Import Robot
  • Author(s): Maarten Lankhorst
  • Date: 2013-10-16 13:52:07 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20131016135207-9gtod705bh0zpbxe
Tags: 9.1.7-1ubuntu2~precise1
Copy from raring, new upstream release. (LP: #1236340)

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
   vs->thread4.max_threads = CLAMP(brw->urb.nr_vs_entries / 2,
131
131
                                   1, brw->max_vs_threads) - 1;
132
132
 
133
 
   /* No samplers for ARB_vp programs:
134
 
    */
135
 
   /* It has to be set to 0 for Ironlake
136
 
    */
137
 
   vs->vs5.sampler_count = 0;
 
133
   if (intel->gen == 5)
 
134
      vs->vs5.sampler_count = 0; /* hardware requirement */
 
135
   else {
 
136
      /* CACHE_NEW_SAMPLER */
 
137
      vs->vs5.sampler_count = (brw->sampler.count + 3) / 4;
 
138
   }
 
139
 
138
140
 
139
141
   if (unlikely(INTEL_DEBUG & DEBUG_STATS))
140
142
      vs->thread4.stats_enable = 1;
143
145
    */
144
146
   vs->vs6.vs_enable = 1;
145
147
 
 
148
   /* Set the sampler state pointer, and its reloc
 
149
    */
 
150
   if (brw->sampler.count) {
 
151
      vs->vs5.sampler_state_pointer =
 
152
         (intel->batch.bo->offset + brw->sampler.offset) >> 5;
 
153
      drm_intel_bo_emit_reloc(intel->batch.bo,
 
154
                              brw->vs.state_offset +
 
155
                              offsetof(struct brw_vs_unit_state, vs5),
 
156
                              intel->batch.bo,
 
157
                              brw->sampler.offset | vs->vs5.sampler_count,
 
158
                              I915_GEM_DOMAIN_INSTRUCTION, 0);
 
159
   }
 
160
 
146
161
   /* Emit scratch space relocation */
147
162
   if (brw->vs.prog_data->total_scratch != 0) {
148
163
      drm_intel_bo_emit_reloc(intel->batch.bo,
164
179
                BRW_NEW_CURBE_OFFSETS |
165
180
                BRW_NEW_URB_FENCE |
166
181
                BRW_NEW_VERTEX_PROGRAM),
167
 
      .cache = CACHE_NEW_VS_PROG
 
182
      .cache = CACHE_NEW_VS_PROG | CACHE_NEW_SAMPLER
168
183
   },
169
184
   .emit = brw_upload_vs_unit,
170
185
};