llvmpipe: Shader function arguments don't alias.
authorJosé Fonseca <jfonseca@vmware.com>
Sun, 16 Aug 2009 09:02:17 +0000 (10:02 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 29 Aug 2009 08:21:32 +0000 (09:21 +0100)
src/gallium/drivers/llvmpipe/lp_state_fs.c

index c148a9f8e7a936055645c8e0c0c18d947c86fd40..b9bb7abb0b04e6adbdea608f3df36b51ec6e9f04 100644 (file)
@@ -88,6 +88,8 @@ shader_generate(struct llvmpipe_screen *screen,
 
    shader->function = LLVMAddFunction(screen->module, "shader", func_type);
    LLVMSetFunctionCallConv(shader->function, LLVMCCallConv);
+   for(i = 0; i < Elements(arg_types); ++i)
+      LLVMAddAttribute(LLVMGetParam(shader->function, i), LLVMNoAliasAttribute);
 
    pos_ptr = LLVMGetParam(shader->function, 0);
    a0_ptr = LLVMGetParam(shader->function, 1);