summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r--src/mesa/drivers/dri/common/dri_bufmgr.c5
-rw-r--r--src/mesa/drivers/dri/common/dri_bufmgr.h38
-rw-r--r--src/mesa/drivers/dri/common/dri_bufmgr_fake.c282
-rw-r--r--src/mesa/drivers/dri/common/extension_helper.h48
4 files changed, 258 insertions, 115 deletions
diff --git a/src/mesa/drivers/dri/common/dri_bufmgr.c b/src/mesa/drivers/dri/common/dri_bufmgr.c
index 83886480dd..72a4a17150 100644
--- a/src/mesa/drivers/dri/common/dri_bufmgr.c
+++ b/src/mesa/drivers/dri/common/dri_bufmgr.c
@@ -40,9 +40,8 @@ dri_bo_alloc(dri_bufmgr *bufmgr, const char *name, unsigned long size,
assert((location_mask & ~(DRM_BO_FLAG_MEM_LOCAL | DRM_BO_FLAG_MEM_TT |
DRM_BO_FLAG_MEM_VRAM | DRM_BO_FLAG_MEM_PRIV0 |
DRM_BO_FLAG_MEM_PRIV1 | DRM_BO_FLAG_MEM_PRIV2 |
- DRM_BO_FLAG_MEM_PRIV3 |
- DRM_BO_FLAG_MEM_PRIV4)) == 0);
-
+ DRM_BO_FLAG_MEM_PRIV3 | DRM_BO_FLAG_MEM_PRIV4 |
+ DRM_BO_FLAG_CACHED | DRM_BO_FLAG_CACHED_MAPPED)) == 0);
return bufmgr->bo_alloc(bufmgr, name, size, alignment, location_mask);
}
diff --git a/src/mesa/drivers/dri/common/dri_bufmgr.h b/src/mesa/drivers/dri/common/dri_bufmgr.h
index 7dbb558949..5c519cb38f 100644
--- a/src/mesa/drivers/dri/common/dri_bufmgr.h
+++ b/src/mesa/drivers/dri/common/dri_bufmgr.h
@@ -134,13 +134,42 @@ struct _dri_bufmgr {
* Tears down the buffer manager instance.
*/
void (*destroy)(dri_bufmgr *bufmgr);
-
+
/**
- * Add relocation
+ * Add relocation entry in reloc_buf, to be set on command submission.
+ *
+ * \param reloc_buf Buffer to write the relocation into.
+ * \param flags BO flags to be used in validating the target buffer.
+ * Applicable flags include:
+ * - DRM_BO_FLAG_READ: The buffer will be read in the process of
+ * command execution.
+ * - DRM_BO_FLAG_WRITE: The buffer will be written in the process of
+ * command execution.
+ * - DRM_BO_FLAG_MEM_TT: The buffer should be validated in TT memory.
+ * - DRM_BO_FLAG_MEM_VRAM: The buffer should be validated in video
+ * memory.
+ * \param delta Constant value to be added to the relocation target's offset.
+ * \param offset Byte offset within batch_buf of the relocated pointer.
+ * \param target Buffer whose offset should be written into the relocation
+ * entry.
*/
- void (*emit_reloc)(dri_bo *batch_buf, GLuint flags, GLuint delta, GLuint offset, dri_bo *relocatee);
+ void (*emit_reloc)(dri_bo *reloc_buf, GLuint flags, GLuint delta,
+ GLuint offset, dri_bo *target);
- void *(*process_relocs)(dri_bo *batch_buf, GLuint *count);
+ /**
+ * Processes the relocations, either in userland or by converting the list
+ * for use in batchbuffer submission.
+ *
+ * Kernel-based implementations will return a pointer to the arguments
+ * to be handed with batchbuffer submission to the kernel. The userland
+ * implementation performs the buffer validation and emits relocations
+ * into them the appopriate order.
+ *
+ * \param batch_buf buffer at the root of the tree of relocations
+ * \param count returns the number of buffers validated.
+ * \return relocation record for use in command submission.
+ * */
+ void *(*process_relocs)(dri_bo *batch_buf, GLuint *count);
void (*post_submit)(dri_bo *batch_buf, dri_fence **fence);
};
@@ -173,6 +202,7 @@ dri_bufmgr *dri_bufmgr_fake_init(unsigned long low_offset, void *low_virtual,
int (*fence_wait)(void *private,
unsigned int cookie),
void *driver_priv);
+void dri_bufmgr_fake_set_debug(dri_bufmgr *bufmgr, GLboolean enable_debug);
void dri_bufmgr_destroy(dri_bufmgr *bufmgr);
dri_bo *dri_ttm_bo_create_from_handle(dri_bufmgr *bufmgr, const char *name,
unsigned int handle);
diff --git a/src/mesa/drivers/dri/common/dri_bufmgr_fake.c b/src/mesa/drivers/dri/common/dri_bufmgr_fake.c
index bda45d921c..fa82599094 100644
--- a/src/mesa/drivers/dri/common/dri_bufmgr_fake.c
+++ b/src/mesa/drivers/dri/common/dri_bufmgr_fake.c
@@ -41,11 +41,10 @@
#include "mm.h"
#include "imports.h"
-#if 0
-#define DBG(...) _mesa_printf(__VA_ARGS__)
-#else
-#define DBG(...)
-#endif
+#define DBG(...) do { \
+ if (bufmgr_fake->debug) \
+ _mesa_printf(__VA_ARGS__); \
+} while (0)
/* Internal flags:
*/
@@ -63,20 +62,31 @@
struct fake_buffer_reloc
{
- dri_bo *buf;
+ dri_bo *reloc_buf;
+ dri_bo *target_buf;
GLuint offset;
- GLuint delta; /* not needed? */
+ GLuint delta;
GLuint validate_flags;
+ GLboolean relocated;
};
struct block {
struct block *next, *prev;
struct mem_block *mem; /* BM_MEM_AGP */
+ /**
+ * Marks that the block is currently in the aperture and has yet to be
+ * fenced.
+ */
unsigned on_hardware:1;
+ /**
+ * Marks that the block is currently fenced (being used by rendering) and
+ * can't be freed until @fence is passed.
+ */
unsigned fenced:1;
- unsigned fence; /* BM_MEM_AGP, Split to read_fence, write_fence */
+ /** Fence cookie for the block. */
+ unsigned fence; /* Split to read_fence, write_fence */
dri_bo *bo;
void *virtual;
@@ -118,13 +128,27 @@ typedef struct _bufmgr_fake {
/** Driver-supplied argument to driver callbacks */
void *driver_priv;
+ GLboolean debug;
/** fake relocation list */
struct fake_buffer_reloc reloc[MAX_RELOCS];
GLuint nr_relocs;
GLboolean performed_rendering;
+ GLboolean in_relocation;
} dri_bufmgr_fake;
+#define RELOC_CACHE_COUNT 10
+/**
+ * Relocation cache entry.
+ *
+ * These are used in buffer relocation to avoid re-mapping (and therefore
+ * dirtying) a buffer to emit constant relocations.
+ */
+struct reloc_cache {
+ unsigned int offset;
+ uint32_t data;
+};
+
typedef struct _dri_bo_fake {
dri_bo bo;
@@ -139,7 +163,21 @@ typedef struct _dri_bo_fake {
*/
unsigned int flags;
unsigned int alignment;
- GLboolean is_static;
+ GLboolean is_static, validated;
+ unsigned int map_count;
+ /**
+ * Relocation count with this as reloc_buffer, to assist in determining the
+ * order to perform relocations.
+ */
+ unsigned int nr_relocs;
+ struct reloc_cache reloc_cache[RELOC_CACHE_COUNT];
+
+ /* Flags for the buffer to be validated with in command submission */
+ uint64_t validate_flags;
+
+ /* Number of entries in the relocation data cache */
+ unsigned int reloc_cache_count;
+
struct block *block;
void *backing_store;
@@ -545,6 +583,8 @@ dri_fake_bo_alloc(dri_bufmgr *bufmgr, const char *name,
bufmgr_fake = (dri_bufmgr_fake *)bufmgr;
+ assert(size != 0);
+
bo_fake = calloc(1, sizeof(*bo_fake));
if (!bo_fake)
return NULL;
@@ -581,6 +621,8 @@ dri_fake_bo_alloc_static(dri_bufmgr *bufmgr, const char *name,
bufmgr_fake = (dri_bufmgr_fake *)bufmgr;
+ assert(size != 0);
+
bo_fake = calloc(1, sizeof(*bo_fake));
if (!bo_fake)
return NULL;
@@ -629,6 +671,7 @@ dri_fake_bo_unreference(dri_bo *bo)
free_backing_store(bo);
_glthread_UNLOCK_MUTEX(bufmgr_fake->mutex);
free(bo);
+ DBG("drm_bo_unreference: free %s\n", bo_fake->name);
return;
}
_glthread_UNLOCK_MUTEX(bufmgr_fake->mutex);
@@ -649,6 +692,17 @@ dri_fake_bo_map(dri_bo *bo, GLboolean write_enable)
return 0;
_glthread_LOCK_MUTEX(bufmgr_fake->mutex);
+ /* Allow recursive mapping, which is used internally in relocation. */
+ if (bo_fake->map_count++ != 0) {
+ _glthread_UNLOCK_MUTEX(bufmgr_fake->mutex);
+ return 0;
+ }
+
+ /* Clear the relocation cache if unknown data is going to be written in. */
+ if (!bufmgr_fake->in_relocation && write_enable) {
+ bo_fake->reloc_cache_count = 0;
+ }
+
{
DBG("drm_bo_map: (buf %d: %s, %d kb)\n", bo_fake->id, bo_fake->name,
bo_fake->bo.size / 1024);
@@ -692,20 +746,26 @@ dri_fake_bo_map(dri_bo *bo, GLboolean write_enable)
static int
dri_fake_bo_unmap(dri_bo *bo)
{
+ dri_bufmgr_fake *bufmgr_fake = (dri_bufmgr_fake *)bo->bufmgr;
dri_bo_fake *bo_fake = (dri_bo_fake *)bo;
/* Static buffers are always mapped. */
if (bo_fake->is_static)
return 0;
- if (bo == NULL)
+ _glthread_LOCK_MUTEX(bufmgr_fake->mutex);
+ if (--bo_fake->map_count != 0) {
+ _glthread_UNLOCK_MUTEX(bufmgr_fake->mutex);
return 0;
+ }
DBG("drm_bo_unmap: (buf %d: %s, %d kb)\n", bo_fake->id, bo_fake->name,
bo_fake->bo.size / 1024);
bo->virtual = NULL;
+ _glthread_UNLOCK_MUTEX(bufmgr_fake->mutex);
+
return 0;
}
@@ -718,10 +778,10 @@ dri_fake_bo_validate(dri_bo *bo, unsigned int flags)
/* XXX: Sanity-check whether we've already validated this one under
* different flags. See drmAddValidateItem().
*/
+ bufmgr_fake = (dri_bufmgr_fake *)bo->bufmgr;
DBG("drm_bo_validate: (buf %d: %s, %d kb)\n", bo_fake->id, bo_fake->name,
bo_fake->bo.size / 1024);
- bufmgr_fake = (dri_bufmgr_fake *)bo->bufmgr;
_glthread_LOCK_MUTEX(bufmgr_fake->mutex);
{
@@ -854,17 +914,34 @@ dri_fake_destroy(dri_bufmgr *bufmgr)
}
static void
-dri_fake_emit_reloc(dri_bo *batch_buf, GLuint flags, GLuint delta, GLuint offset,
- dri_bo *relocatee)
+dri_fake_emit_reloc(dri_bo *reloc_buf, GLuint flags, GLuint delta,
+ GLuint offset, dri_bo *target_buf)
{
- dri_bufmgr_fake *bufmgr_fake = (dri_bufmgr_fake *)batch_buf->bufmgr;
+ dri_bufmgr_fake *bufmgr_fake = (dri_bufmgr_fake *)reloc_buf->bufmgr;
struct fake_buffer_reloc *r = &bufmgr_fake->reloc[bufmgr_fake->nr_relocs++];
-
+ dri_bo_fake *target_fake = (dri_bo_fake *)target_buf;
+ dri_bo_fake *reloc_fake = (dri_bo_fake *)reloc_buf;
+
assert(bufmgr_fake->nr_relocs <= MAX_RELOCS);
- dri_bo_reference(relocatee);
+ dri_bo_reference(target_buf);
+
+ if (target_fake->flags == 0) {
+ target_fake->validate_flags = flags;
+ } else {
+ /* Mask the memory location to the intersection of all the memory
+ * locations the buffer is being validated to.
+ */
+ target_fake->validate_flags =
+ (target_fake->validate_flags & ~DRM_BO_MASK_MEM) |
+ (flags & target_fake->validate_flags & DRM_BO_MASK_MEM);
+ /* All the other flags just accumulate. */
+ target_fake->validate_flags |= flags & ~DRM_BO_MASK_MEM;
+ }
+ reloc_fake->nr_relocs++;
- r->buf = relocatee;
+ r->reloc_buf = reloc_buf;
+ r->target_buf = target_buf;
r->offset = offset;
r->delta = delta;
r->validate_flags = flags;
@@ -872,81 +949,114 @@ dri_fake_emit_reloc(dri_bo *batch_buf, GLuint flags, GLuint delta, GLuint offset
return;
}
-
-static int
-relocation_sort(const void *a_in, const void *b_in) {
- const struct fake_buffer_reloc *a = a_in, *b = b_in;
-
- return (intptr_t)a->buf < (intptr_t)b->buf ? -1 : 1;
-}
-
static void *
dri_fake_process_relocs(dri_bo *batch_buf, GLuint *count_p)
{
dri_bufmgr_fake *bufmgr_fake = (dri_bufmgr_fake *)batch_buf->bufmgr;
GLuint i;
- GLuint *ptr;
GLuint count = 0;
-
- assert(batch_buf->virtual != NULL);
- ptr = batch_buf->virtual;
+ GLboolean cont;
+ int ret;
bufmgr_fake->performed_rendering = GL_FALSE;
+ bufmgr_fake->in_relocation = GL_TRUE;
- /* Sort our relocation list in terms of referenced buffer pointer.
- * This lets us uniquely validate the buffers with the sum of all the flags,
- * while avoiding O(n^2) on number of relocations.
+ /* Loop over the relocation list validating and writing the relocation
+ * entries for target buffers that don't contain any remaining relocations.
+ * In the current examples we have, the depth of the tree of relocations
+ * is small (up to 3), so this loop shouldn't hurt too bad.
*/
- qsort(bufmgr_fake->reloc, bufmgr_fake->nr_relocs, sizeof(bufmgr_fake->reloc[0]),
- relocation_sort);
+ do {
+ cont = GL_FALSE;
+
+ for (i = 0; i < bufmgr_fake->nr_relocs; i++) {
+ struct fake_buffer_reloc *r = &bufmgr_fake->reloc[i];
+ dri_bo_fake *reloc_fake = (dri_bo_fake *)r->reloc_buf;
+ dri_bo_fake *target_fake = (dri_bo_fake *)r->target_buf;
+ uint32_t reloc_data;
+ int c;
+ GLboolean cached = GL_FALSE;
+
+ if (r->relocated)
+ continue;
+
+ /* If there are still relocations to be done in the buffer, don't
+ * validate it yet.
+ */
+ if (target_fake->nr_relocs != 0)
+ continue;
+
+ /* Validate the target buffer if that hasn't been done. */
+ if (!target_fake->validated) {
+ ret = dri_fake_bo_validate(r->target_buf,
+ target_fake->validate_flags);
+ if (ret != 0) {
+ dri_fence *fo;
+
+ dri_bo_unmap(r->reloc_buf);
+ fo = dri_fake_fence_validated(batch_buf->bufmgr,
+ "batchbuffer failure fence",
+ GL_TRUE);
+ dri_fence_unreference(fo);
+ goto done;
+ }
+ if (target_fake->validate_flags & DRM_BO_FLAG_WRITE)
+ bufmgr_fake->performed_rendering = GL_TRUE;
+ count++;
+ }
- /* Perform the necessary validations of buffers, and enter the relocations
- * in the batchbuffer.
- */
- for (i = 0; i < bufmgr_fake->nr_relocs; i++) {
- struct fake_buffer_reloc *r = &bufmgr_fake->reloc[i];
+ /* Calculate the value of the relocation entry. */
- if (r->validate_flags & DRM_BO_FLAG_WRITE)
- bufmgr_fake->performed_rendering = GL_TRUE;
+ reloc_data = r->target_buf->offset + r->delta;
- /* If this is the first time we've seen this buffer in the relocation
- * list, figure out our flags and validate it.
- */
- if (i == 0 || bufmgr_fake->reloc[i - 1].buf != r->buf) {
- uint32_t validate_flags;
- int j, ret;
-
- /* Accumulate the flags we need for validating this buffer. */
- validate_flags = r->validate_flags;
- for (j = i + 1; j < bufmgr_fake->nr_relocs; j++) {
- if (bufmgr_fake->reloc[j].buf != r->buf)
- break;
- validate_flags |= bufmgr_fake->reloc[j].validate_flags;
+ /* Check the relocation cache of the buffer to see if we don't need
+ * to bother writing this one.
+ */
+ for (c = 0; c < reloc_fake->reloc_cache_count; c++) {
+ if (reloc_fake->reloc_cache[c].offset == r->offset &&
+ reloc_fake->reloc_cache[c].data == reloc_data) {
+ cached = GL_TRUE;
+ }
}
- /* Validate. If we fail, fence to clear the unfenced list and bail
- * out.
- */
- ret = dri_fake_bo_validate(r->buf, validate_flags);
- if (ret != 0) {
- dri_fence *fo;
- dri_bo_unmap(batch_buf);
- fo = dri_fake_fence_validated(batch_buf->bufmgr,
- "batchbuffer failure fence", GL_TRUE);
- dri_fence_unreference(fo);
- goto done;
+ if (!cached) {
+ /* Map and write in the relocation to reloc_buf */
+ if (reloc_fake->map_count == 0)
+ dri_bo_map(r->reloc_buf, GL_TRUE);
+
+ *(uint32_t *)(r->reloc_buf->virtual + r->offset) = reloc_data;
+
+ /* Stick this new entry in the relocation cache if possible */
+ if (reloc_fake->reloc_cache_count < RELOC_CACHE_COUNT) {
+ struct reloc_cache *entry;
+
+ entry = &reloc_fake->reloc_cache[reloc_fake->reloc_cache_count];
+ entry->offset = r->offset;
+ entry->data = reloc_data;
+
+ reloc_fake->reloc_cache_count++;
+ }
}
- count++;
+
+ /* Mark this relocation in reloc_buf as done. If it was the last
+ * reloc to be done to it, unmap the buffer so it can be validated
+ * next.
+ */
+ reloc_fake->nr_relocs--;
+ if (reloc_fake->nr_relocs == 0 && reloc_fake->map_count != 0)
+ dri_bo_unmap(r->reloc_buf);
+
+ r->relocated = GL_TRUE;
+
+ cont = GL_TRUE;
}
- ptr[r->offset / 4] = r->buf->offset + r->delta;
- dri_bo_unreference(r->buf);
- }
- dri_bo_unmap(batch_buf);
+ } while (cont);
- dri_fake_bo_validate(batch_buf, DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_EXE);
+ ret = dri_fake_bo_validate(batch_buf, DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_EXE);
+ assert(ret == 0);
*count_p = count;
- bufmgr_fake->nr_relocs = 0;
+ bufmgr_fake->in_relocation = GL_FALSE;
done:
return NULL;
}
@@ -956,6 +1066,7 @@ dri_fake_post_submit(dri_bo *batch_buf, dri_fence **last_fence)
{
dri_bufmgr_fake *bufmgr_fake = (dri_bufmgr_fake *)batch_buf->bufmgr;
dri_fence *fo;
+ int i;
fo = dri_fake_fence_validated(batch_buf->bufmgr, "Batch fence", GL_TRUE);
@@ -965,6 +1076,33 @@ dri_fake_post_submit(dri_bo *batch_buf, dri_fence **last_fence)
} else {
dri_fence_unreference(fo);
}
+
+ /* Clean up the validation list. */
+ for (i = 0; i < bufmgr_fake->nr_relocs; i++) {
+ struct fake_buffer_reloc *r = &bufmgr_fake->reloc[i];
+ dri_bo_fake *reloc_fake = (dri_bo_fake *)r->reloc_buf;
+ dri_bo_fake *target_fake = (dri_bo_fake *)r->target_buf;
+
+ assert(r->relocated);
+ assert(reloc_fake->map_count == 0);
+ DBG("%s@0x%08x + 0x%08x -> %s@0x%08x + 0x%08x\n",
+ reloc_fake->name, (uint32_t)r->reloc_buf->offset, r->offset,
+ target_fake->name, (uint32_t)r->target_buf->offset, r->delta);
+
+ reloc_fake->validate_flags = 0;
+ target_fake->validated = GL_FALSE;
+ r->relocated = GL_FALSE;
+ dri_bo_unreference(r->target_buf);
+ }
+ bufmgr_fake->nr_relocs = 0;
+}
+
+void
+dri_bufmgr_fake_set_debug(dri_bufmgr *bufmgr, GLboolean enable_debug)
+{
+ dri_bufmgr_fake *bufmgr_fake = (dri_bufmgr_fake *)bufmgr;
+
+ bufmgr_fake->debug = enable_debug;
}
dri_bufmgr *
diff --git a/src/mesa/drivers/dri/common/extension_helper.h b/src/mesa/drivers/dri/common/extension_helper.h
index 065c5d8dae..65e96657b8 100644
--- a/src/mesa/drivers/dri/common/extension_helper.h
+++ b/src/mesa/drivers/dri/common/extension_helper.h
@@ -40,13 +40,6 @@ static const char UniformMatrix3fvARB_names[] =
"";
#endif
-#if defined(need_GL_NV_vertex_program)
-static const char ProgramParameter4fNV_names[] =
- "iiffff\0" /* Parameter signature */
- "glProgramParameter4fNV\0"
- "";
-#endif
-
#if defined(need_GL_VERSION_1_3) || defined(need_GL_ARB_multisample)
static const char SampleCoverageARB_names[] =
"fi\0" /* Parameter signature */
@@ -572,13 +565,6 @@ static const char MatrixIndexusvARB_names[] =
"";
#endif
-#if defined(need_GL_NV_vertex_program)
-static const char ProgramParameter4dvNV_names[] =
- "iip\0" /* Parameter signature */
- "glProgramParameter4dvNV\0"
- "";
-#endif
-
#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
static const char DisableVertexAttribArrayARB_names[] =
"i\0" /* Parameter signature */
@@ -967,13 +953,6 @@ static const char GenerateMipmapEXT_names[] =
"";
#endif
-#if defined(need_GL_NV_vertex_program)
-static const char ProgramParameter4dNV_names[] =
- "iidddd\0" /* Parameter signature */
- "glProgramParameter4dNV\0"
- "";
-#endif
-
#if defined(need_GL_ATI_fragment_shader)
static const char SetFragmentShaderConstantATI_names[] =
"ip\0" /* Parameter signature */
@@ -1311,10 +1290,11 @@ static const char Color3fVertex3fSUN_names[] =
"";
#endif
-#if defined(need_GL_ARB_vertex_program)
+#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
static const char ProgramEnvParameter4fvARB_names[] =
"iip\0" /* Parameter signature */
"glProgramEnvParameter4fvARB\0"
+ "glProgramParameter4fvNV\0"
"";
#endif
@@ -2035,13 +2015,6 @@ static const char WeightfvARB_names[] =
"";
#endif
-#if defined(need_GL_NV_vertex_program)
-static const char ProgramParameter4fvNV_names[] =
- "iip\0" /* Parameter signature */
- "glProgramParameter4fvNV\0"
- "";
-#endif
-
#if defined(need_GL_MESA_window_pos)
static const char WindowPos4fMESA_names[] =
"ffff\0" /* Parameter signature */
@@ -2432,10 +2405,11 @@ static const char GetBufferPointervARB_names[] =
"";
#endif
-#if defined(need_GL_ARB_vertex_program)
+#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
static const char ProgramEnvParameter4fARB_names[] =
"iiffff\0" /* Parameter signature */
"glProgramEnvParameter4fARB\0"
+ "glProgramParameter4fNV\0"
"";
#endif
@@ -2803,10 +2777,11 @@ static const char ReplacementCodePointerSUN_names[] =
"";
#endif
-#if defined(need_GL_ARB_vertex_program)
+#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
static const char ProgramEnvParameter4dARB_names[] =
"iidddd\0" /* Parameter signature */
"glProgramEnvParameter4dARB\0"
+ "glProgramParameter4dNV\0"
"";
#endif
@@ -3660,10 +3635,11 @@ static const char GetColorTableParameteriv_names[] =
"";
#endif
-#if defined(need_GL_ARB_vertex_program)
+#if defined(need_GL_ARB_vertex_program) || defined(need_GL_NV_vertex_program)
static const char ProgramEnvParameter4dvARB_names[] =
"iip\0" /* Parameter signature */
"glProgramEnvParameter4dvARB\0"
+ "glProgramParameter4dvNV\0"
"";
#endif
@@ -5748,12 +5724,10 @@ static const struct dri_extension_function GL_NV_vertex_array_range_functions[]
#if defined(need_GL_NV_vertex_program)
static const struct dri_extension_function GL_NV_vertex_program_functions[] = {
- { ProgramParameter4fNV_names, ProgramParameter4fNV_remap_index, -1 },
{ VertexAttrib4ubvNV_names, VertexAttrib4ubvNV_remap_index, -1 },
{ VertexAttrib4svNV_names, VertexAttrib4svNV_remap_index, -1 },
{ VertexAttribs1dvNV_names, VertexAttribs1dvNV_remap_index, -1 },
{ VertexAttrib1fvNV_names, VertexAttrib1fvNV_remap_index, -1 },
- { ProgramParameter4dvNV_names, ProgramParameter4dvNV_remap_index, -1 },
{ VertexAttrib4fNV_names, VertexAttrib4fNV_remap_index, -1 },
{ VertexAttrib2dNV_names, VertexAttrib2dNV_remap_index, -1 },
{ VertexAttrib4ubNV_names, VertexAttrib4ubNV_remap_index, -1 },
@@ -5761,7 +5735,7 @@ static const struct dri_extension_function GL_NV_vertex_program_functions[] = {
{ VertexAttribs4fvNV_names, VertexAttribs4fvNV_remap_index, -1 },
{ VertexAttrib2sNV_names, VertexAttrib2sNV_remap_index, -1 },
{ VertexAttribs3fvNV_names, VertexAttribs3fvNV_remap_index, -1 },
- { ProgramParameter4dNV_names, ProgramParameter4dNV_remap_index, -1 },
+ { ProgramEnvParameter4fvARB_names, ProgramEnvParameter4fvARB_remap_index, -1 },
{ LoadProgramNV_names, LoadProgramNV_remap_index, -1 },
{ VertexAttrib4fvNV_names, VertexAttrib4fvNV_remap_index, -1 },
{ VertexAttrib3fNV_names, VertexAttrib3fNV_remap_index, -1 },
@@ -5771,14 +5745,15 @@ static const struct dri_extension_function GL_NV_vertex_program_functions[] = {
{ VertexAttrib2fvNV_names, VertexAttrib2fvNV_remap_index, -1 },
{ VertexAttrib2dvNV_names, VertexAttrib2dvNV_remap_index, -1 },
{ VertexAttrib1dvNV_names, VertexAttrib1dvNV_remap_index, -1 },
- { ProgramParameter4fvNV_names, ProgramParameter4fvNV_remap_index, -1 },
{ VertexAttrib1svNV_names, VertexAttrib1svNV_remap_index, -1 },
+ { ProgramEnvParameter4fARB_names, ProgramEnvParameter4fARB_remap_index, -1 },
{ VertexAttribs2svNV_names, VertexAttribs2svNV_remap_index, -1 },
{ GetVertexAttribivNV_names, GetVertexAttribivNV_remap_index, -1 },
{ GetVertexAttribfvNV_names, GetVertexAttribfvNV_remap_index, -1 },
{ VertexAttrib2svNV_names, VertexAttrib2svNV_remap_index, -1 },
{ VertexAttribs1fvNV_names, VertexAttribs1fvNV_remap_index, -1 },
{ IsProgramNV_names, IsProgramNV_remap_index, -1 },
+ { ProgramEnvParameter4dARB_names, ProgramEnvParameter4dARB_remap_index, -1 },
{ VertexAttrib2fNV_names, VertexAttrib2fNV_remap_index, -1 },
{ RequestResidentProgramsNV_names, RequestResidentProgramsNV_remap_index, -1 },
{ ExecuteProgramNV_names, ExecuteProgramNV_remap_index, -1 },
@@ -5791,6 +5766,7 @@ static const struct dri_extension_function GL_NV_vertex_program_functions[] = {
{ GetProgramivNV_names, GetProgramivNV_remap_index, -1 },
{ GetVertexAttribdvNV_names, GetVertexAttribdvNV_remap_index, -1 },
{ VertexAttrib3fvNV_names, VertexAttrib3fvNV_remap_index, -1 },
+ { ProgramEnvParameter4dvARB_names, ProgramEnvParameter4dvARB_remap_index, -1 },
{ VertexAttribs2fvNV_names, VertexAttribs2fvNV_remap_index, -1 },
{ DeleteProgramsNV_names, DeleteProgramsNV_remap_index, -1 },
{ GetVertexAttribPointervNV_names, GetVertexAttribPointervNV_remap_index, -1 },