diff options
author | Keith Whitwell <[email protected]> | 2008-09-26 14:09:04 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-09-26 14:09:04 +0100 |
commit | fb8db63a89c4ac7fbbbc0912e1dde0871ae9c35c (patch) | |
tree | 3d6f43bc2b9bc977216e0d8b67ea9976854d3c8c /src/mesa/shader | |
parent | bb6a69d1696cacf828a3de21bc57678c0e4aa54a (diff) | |
parent | 1e3a44fab068f00378613456036716d0c3772969 (diff) |
Merge commit 'origin/master' into HEAD
Conflicts:
src/mesa/vbo/vbo.h
src/mesa/vbo/vbo_exec_api.c
src/mesa/vbo/vbo_exec_draw.c
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/grammar/grammar_crt.c | 10 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 6 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/mesa/shader/grammar/grammar_crt.c b/src/mesa/shader/grammar/grammar_crt.c index bdf2da9b2e2..d2c95d1c8e7 100644 --- a/src/mesa/shader/grammar/grammar_crt.c +++ b/src/mesa/shader/grammar/grammar_crt.c @@ -10,17 +10,17 @@ void grammar_alloc_free (void *ptr) free (ptr); } -void *grammar_alloc_malloc (unsigned int size) +void *grammar_alloc_malloc (size_t size) { return malloc (size); } -void *grammar_alloc_realloc (void *ptr, unsigned int old_size, unsigned int size) +void *grammar_alloc_realloc (void *ptr, size_t old_size, size_t size) { return realloc (ptr, size); } -void *grammar_memory_copy (void *dst, const void * src, unsigned int size) +void *grammar_memory_copy (void *dst, const void * src, size_t size) { return memcpy (dst, src, size); } @@ -30,7 +30,7 @@ int grammar_string_compare (const byte *str1, const byte *str2) return strcmp ((const char *) str1, (const char *) str2); } -int grammar_string_compare_n (const byte *str1, const byte *str2, unsigned int n) +int grammar_string_compare_n (const byte *str1, const byte *str2, size_t n) { return strncmp ((const char *) str1, (const char *) str2, n); } @@ -40,7 +40,7 @@ byte *grammar_string_copy (byte *dst, const byte *src) return (byte *) strcpy ((char *) dst, (const char *) src); } -byte *grammar_string_copy_n (byte *dst, const byte *src, unsigned int n) +byte *grammar_string_copy_n (byte *dst, const byte *src, size_t n) { return (byte *) strncpy ((char *) dst, (const char *) src, n); } diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 7006e86958d..72a3c0ef9ea 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2439,7 +2439,11 @@ _slang_gen_var_decl(slang_assemble_ctx *A, slang_variable *var) /*assert(!var->declared);*/ var->declared = GL_TRUE; - assert(!is_sampler_type(&var->type)); + if(is_sampler_type(&var->type)) { + slang_info_log_error(A->log, "redeclaration of sampler '%s'", + (char*) var->a_name); + return NULL; + } n = new_node0(IR_VAR_DECL); if (n) { |