From 28bab24e1698843e27d27204a1117066e7ffeabb Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 9 Dec 2010 17:30:41 -0800 Subject: intel: Add spans code for the ARB_texture_rg support. This starts spantmp2.h down the path of using MESA_FORMAT_* for specifying the format instead of the crazy GL format/type combo. --- src/mesa/drivers/dri/intel/intel_span.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/mesa/drivers/dri/intel') diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c index 104cadf0f9..1c128bbfdf 100644 --- a/src/mesa/drivers/dri/intel/intel_span.c +++ b/src/mesa/drivers/dri/intel/intel_span.c @@ -113,6 +113,26 @@ intel_set_span_functions(struct intel_context *intel, #define TAG2(x,y) intel_##x##y##_A8 #include "spantmp2.h" +#define SPANTMP_MESA_FMT MESA_FORMAT_R8 +#define TAG(x) intel_##x##_R8 +#define TAG2(x,y) intel_##x##y##_R8 +#include "spantmp2.h" + +#define SPANTMP_MESA_FMT MESA_FORMAT_RG88 +#define TAG(x) intel_##x##_RG88 +#define TAG2(x,y) intel_##x##y##_RG88 +#include "spantmp2.h" + +#define SPANTMP_MESA_FMT MESA_FORMAT_R16 +#define TAG(x) intel_##x##_R16 +#define TAG2(x,y) intel_##x##y##_R16 +#include "spantmp2.h" + +#define SPANTMP_MESA_FMT MESA_FORMAT_RG1616 +#define TAG(x) intel_##x##_RG1616 +#define TAG2(x,y) intel_##x##y##_RG1616 +#include "spantmp2.h" + #define LOCAL_DEPTH_VARS \ struct intel_renderbuffer *irb = intel_renderbuffer(rb); \ const GLint yScale = rb->Name ? 1 : -1; \ @@ -376,6 +396,18 @@ intel_set_span_functions(struct intel_context *intel, case MESA_FORMAT_S8_Z24: intel_InitDepthPointers_z24_s8(rb); break; + case MESA_FORMAT_R8: + intel_InitPointers_R8(rb); + break; + case MESA_FORMAT_RG88: + intel_InitPointers_RG88(rb); + break; + case MESA_FORMAT_R16: + intel_InitPointers_R16(rb); + break; + case MESA_FORMAT_RG1616: + intel_InitPointers_RG1616(rb); + break; default: _mesa_problem(NULL, "Unexpected MesaFormat %d in intelSetSpanFunctions", -- cgit v1.2.3