summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/i915simple/i915_state_emit.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-22 18:51:39 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-08-22 18:52:40 -0600
commitc990d0fd57a05301429b3af75b7fed0337621941 (patch)
treecad590bc2a48e409810f344d9699f8b2341c1afb /src/mesa/pipe/i915simple/i915_state_emit.c
parentace2b98dd3511ea6959980a2ae2ee90fa7c28748 (diff)
Checkpoint: texture image and sampler state handling, plus better vertex format code.
Texture image/sampler state code should be working, but is disabled for now. Need to fix outstanding issues with vertex formats and texcoords first...
Diffstat (limited to 'src/mesa/pipe/i915simple/i915_state_emit.c')
-rw-r--r--src/mesa/pipe/i915simple/i915_state_emit.c36
1 files changed, 33 insertions, 3 deletions
diff --git a/src/mesa/pipe/i915simple/i915_state_emit.c b/src/mesa/pipe/i915simple/i915_state_emit.c
index dff9d40a83..ceb96289b5 100644
--- a/src/mesa/pipe/i915simple/i915_state_emit.c
+++ b/src/mesa/pipe/i915simple/i915_state_emit.c
@@ -180,7 +180,6 @@ i915_emit_hardware_state(struct i915_context *i915 )
zformat = translate_depth_format( i915->framebuffer.zbuf->format );
OUT_BATCH(_3DSTATE_DST_BUF_VARS_CMD);
-
OUT_BATCH(DSTORG_HORT_BIAS(0x8) | /* .5 */
DSTORG_VERT_BIAS(0x8) | /* .5 */
LOD_PRECLAMP_OGL |
@@ -190,6 +189,38 @@ i915_emit_hardware_state(struct i915_context *i915 )
}
}
+
+#if 0
+ /* texture images */
+ if (i915->hardware_dirty & I915_HW_MAP)
+ {
+ const uint nr = i915->current.sampler_enable_nr;
+ const uint enabled = i915->current.sampler_enable_flags;
+ uint unit;
+ uint count = 0;
+ OUT_BATCH(_3DSTATE_MAP_STATE | (3 * nr));
+ OUT_BATCH(enabled);
+ for (unit = 0; unit < I915_TEX_UNITS; unit++) {
+ if (enabled & (1 << unit)) {
+ struct pipe_buffer_handle *buf =
+ i915->texture[unit]->region->buffer;
+ uint offset = 0;
+ assert(buf);
+
+ count++;
+
+ OUT_RELOC(buf,
+ I915_BUFFER_ACCESS_READ,
+ offset);
+ OUT_BATCH(i915->current.texbuffer[unit][0]); /* MS3 */
+ OUT_BATCH(i915->current.texbuffer[unit][1]); /* MS4 */
+ }
+ }
+ assert(count == nr);
+ }
+#endif
+
+#if 0
/* samplers */
if (i915->hardware_dirty & I915_HW_SAMPLER)
{
@@ -210,8 +241,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
}
}
}
-
-
+#endif
/* constants */
if (i915->hardware_dirty & I915_HW_PROGRAM)