i965/cs: Create the brw_compute_program struct, and the code to initialize it.
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_span.c
index b5343e59dd38d51099c58bf4c890319eb70c2adc..42f62a0cb7f418cf9b264d671bbb3eb27b03fe38 100644 (file)
@@ -36,13 +36,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  * Authors:
  *   Kevin E. Martin <martin@valinux.com>
  *   Gareth Hughes <gareth@valinux.com>
- *   Keith Whitwell <keith@tungstengraphics.com>
+ *   Keith Whitwell <keithw@vmware.com>
  *
  */
 
 #include "main/glheader.h"
 #include "main/texformat.h"
 #include "main/renderbuffer.h"
+#include "main/samplerobj.h"
 #include "swrast/swrast.h"
 #include "swrast/s_renderbuffer.h"
 
@@ -67,7 +68,7 @@ radeon_renderbuffer_map(struct gl_context *ctx, struct gl_renderbuffer *rb)
        rrb->base.Map = map;
        rrb->base.RowStride = stride;
        /* No floating point color buffers, use GLubytes */
-       rrb->Base.ColorType = GL_UNSIGNED_BYTE;
+       rrb->base.ColorType = GL_UNSIGNED_BYTE;
 }
 
 static void
@@ -118,17 +119,11 @@ radeon_unmap_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
 static void radeonSpanRenderStart(struct gl_context * ctx)
 {
        radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
-       int i;
 
        radeon_firevertices(rmesa);
 
-       for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) {
-               if (ctx->Texture.Unit[i]._ReallyEnabled) {
-                       radeon_validate_texture_miptree(ctx, ctx->Texture.Unit[i]._Current);
-                       radeon_swrast_map_texture_images(ctx, ctx->Texture.Unit[i]._Current);
-               }
-       }
-       
+       _swrast_map_textures(ctx);
+
        radeon_map_framebuffer(ctx, ctx->DrawBuffer);
        if (ctx->ReadBuffer != ctx->DrawBuffer)
                radeon_map_framebuffer(ctx, ctx->ReadBuffer);
@@ -136,13 +131,8 @@ static void radeonSpanRenderStart(struct gl_context * ctx)
 
 static void radeonSpanRenderFinish(struct gl_context * ctx)
 {
-       int i;
-
        _swrast_flush(ctx);
-
-       for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++)
-               if (ctx->Texture.Unit[i]._ReallyEnabled)
-                       radeon_swrast_unmap_texture_images(ctx, ctx->Texture.Unit[i]._Current);
+       _swrast_unmap_textures(ctx);
 
        radeon_unmap_framebuffer(ctx, ctx->DrawBuffer);
        if (ctx->ReadBuffer != ctx->DrawBuffer)