aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/drivers')
-rw-r--r--mesalib/src/mesa/drivers/common/meta.c4
-rw-r--r--mesalib/src/mesa/drivers/common/meta_tex_subimage.c32
-rw-r--r--mesalib/src/mesa/drivers/dri/common/dri_test.c11
3 files changed, 14 insertions, 33 deletions
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
index fdc4cf1e9..cf99d9563 100644
--- a/mesalib/src/mesa/drivers/common/meta.c
+++ b/mesalib/src/mesa/drivers/common/meta.c
@@ -247,9 +247,9 @@ _mesa_meta_setup_blit_shader(struct gl_context *ctx,
struct blit_shader_table *table)
{
char *vs_source, *fs_source;
- void *const mem_ctx = ralloc_context(NULL);
struct blit_shader *shader = choose_blit_shader(target, table);
const char *vs_input, *vs_output, *fs_input, *vs_preprocess, *fs_preprocess;
+ void *mem_ctx;
if (ctx->Const.GLSLVersion < 130) {
vs_preprocess = "";
@@ -273,6 +273,8 @@ _mesa_meta_setup_blit_shader(struct gl_context *ctx,
return;
}
+ mem_ctx = ralloc_context(NULL);
+
vs_source = ralloc_asprintf(mem_ctx,
"%s\n"
"%s vec2 position;\n"
diff --git a/mesalib/src/mesa/drivers/common/meta_tex_subimage.c b/mesalib/src/mesa/drivers/common/meta_tex_subimage.c
index e29addb73..ad6e7873e 100644
--- a/mesalib/src/mesa/drivers/common/meta_tex_subimage.c
+++ b/mesalib/src/mesa/drivers/common/meta_tex_subimage.c
@@ -150,9 +150,6 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,
bool success = false;
int z;
- /* XXX: This should probably be passed in from somewhere */
- const char *where = "_mesa_meta_pbo_TexSubImage";
-
if (!_mesa_is_bufferobj(packing->BufferObj) && !create_pbo)
return false;
@@ -165,19 +162,6 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,
if (ctx->_ImageTransferState)
return false;
- if (!_mesa_validate_pbo_access(dims, packing, width, height, depth,
- format, type, INT_MAX, pixels)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(out of bounds PBO access)", where);
- return true;
- }
-
- if (_mesa_check_disallowed_mapping(packing->BufferObj)) {
- /* buffer is mapped - that's an error */
- _mesa_error(ctx, GL_INVALID_OPERATION, "%s(PBO is mapped)", where);
- return true;
- }
-
/* For arrays, use a tall (height * depth) 2D texture but taking into
* account the inter-image padding specified with the image height packing
* property.
@@ -277,9 +261,6 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims,
bool success = false;
int z;
- /* XXX: This should probably be passed in from somewhere */
- const char *where = "_mesa_meta_pbo_GetTexSubImage";
-
if (!_mesa_is_bufferobj(packing->BufferObj))
return false;
@@ -292,19 +273,6 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims,
if (ctx->_ImageTransferState)
return false;
- if (!_mesa_validate_pbo_access(dims, packing, width, height, depth,
- format, type, INT_MAX, pixels)) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(out of bounds PBO access)", where);
- return true;
- }
-
- if (_mesa_check_disallowed_mapping(packing->BufferObj)) {
- /* buffer is mapped - that's an error */
- _mesa_error(ctx, GL_INVALID_OPERATION, "%s(PBO is mapped)", where);
- return true;
- }
-
/* For arrays, use a tall (height * depth) 2D texture but taking into
* account the inter-image padding specified with the image height packing
* property.
diff --git a/mesalib/src/mesa/drivers/dri/common/dri_test.c b/mesalib/src/mesa/drivers/dri/common/dri_test.c
index 7ab50d923..57bfa5b93 100644
--- a/mesalib/src/mesa/drivers/dri/common/dri_test.c
+++ b/mesalib/src/mesa/drivers/dri/common/dri_test.c
@@ -76,6 +76,17 @@ _glapi_get_dispatch_table_size(void)
return 0;
}
+PUBLIC void
+_glapi_set_nop_handler(_glapi_nop_handler_proc func)
+{
+}
+
+PUBLIC struct _glapi_table *
+_glapi_new_nop_table(unsigned num_entries)
+{
+ return NULL;
+}
+
#ifndef NO_MAIN
int main(int argc, char** argv)
{