#include "polygon.h"
#include "queryobj.h"
#include "readpix.h"
+#if FEATURE_ARB_sampler_objects
+#include "samplerobj.h"
+#endif
#include "scissor.h"
#include "stencil.h"
#include "texenv.h"
/* GL_ARB_texture_buffer_object */
SET_TexBufferARB(exec, _mesa_TexBuffer);
+#if FEATURE_ARB_sampler_objects
+ _mesa_init_sampler_object_dispatch(exec);
+#endif
+
return exec;
}
#include "eval.h"
#include "framebuffer.h"
#include "glapi/glapi.h"
+#include "glapidispatch.h"
#include "hash.h"
#include "image.h"
#include "light.h"
/* GL_NV_texture_barrier */
OPCODE_TEXTURE_BARRIER_NV,
+ /* GL_ARB_sampler_object */
+ OPCODE_BIND_SAMPLER,
+
/* The following three are meta instructions */
OPCODE_ERROR, /* raise compiled-in error */
OPCODE_CONTINUE,
}
+/* GL_ARB_sampler_objects */
+static void
+save_BindSampler(GLuint unit, GLuint sampler)
+{
+ Node *n;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ n = alloc_instruction(ctx, OPCODE_BIND_SAMPLER, 2);
+ if (n) {
+ n[1].ui = unit;
+ n[2].ui = sampler;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_BindSampler(ctx->Exec, (unit, sampler));
+ }
+}
+
+
/**
* Save an error-generating command into display list.
*
CALL_TextureBarrierNV(ctx->Exec, ());
break;
+ case OPCODE_BIND_SAMPLER:
+ CALL_BindSampler(ctx->Exec, (n[1].ui, n[2].ui));
+ break;
+
case OPCODE_CONTINUE:
n = (Node *) n[1].next;
break;
/* GL_NV_texture_barrier */
SET_TextureBarrierNV(table, save_TextureBarrierNV);
+ /* GL_ARB_sampler_objects */
+ SET_BindSampler(table, save_BindSampler);
+
/* GL_ARB_draw_buffer_blend */
SET_BlendFunciARB(table, save_BlendFunci);
SET_BlendFuncSeparateiARB(table, save_BlendFuncSeparatei);
#define FEATURE_ARB_framebuffer_object (FEATURE_GL && FEATURE_EXT_framebuffer_object)
#define FEATURE_ARB_map_buffer_range FEATURE_GL
#define FEATURE_ARB_pixel_buffer_object (FEATURE_GL && FEATURE_EXT_pixel_buffer_object)
+#define FEATURE_ARB_sampler_objects FEATURE_GL
#define FEATURE_ARB_sync FEATURE_GL
#define FEATURE_ARB_vertex_buffer_object 1
#include "main/imports.h"
#include "main/context.h"
+#include "main/samplerobj.h"
#include "main/shaderobj.h"
#include "program/prog_cache.h"
#include "vbo/vbo.h"
void st_init_driver_functions(struct dd_function_table *functions)
{
_mesa_init_shader_object_functions(functions);
+ _mesa_init_sampler_object_functions(functions);
st_init_accum_functions(functions);
st_init_blit_functions(functions);
ctx->Extensions.ARB_half_float_pixel = GL_TRUE;
ctx->Extensions.ARB_map_buffer_range = GL_TRUE;
ctx->Extensions.ARB_multisample = GL_TRUE;
+ ctx->Extensions.ARB_sampler_objects = GL_TRUE;
ctx->Extensions.ARB_texture_border_clamp = GL_TRUE; /* XXX temp */
ctx->Extensions.ARB_texture_compression = GL_TRUE;
ctx->Extensions.ARB_texture_cube_map = GL_TRUE;