projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a258701
)
gallivm: fix lp_build_sample_offset() crash when indexing a 1-D texture
author
Brian Paul
<brianp@vmware.com>
Thu, 29 Jul 2010 18:18:48 +0000
(19:18 +0100)
committer
José Fonseca
<jfonseca@vmware.com>
Thu, 29 Jul 2010 18:19:05 +0000
(19:19 +0100)
If y==NULL and y_stride==NULL it means the texture is 1D. Return
zero for out_i and the offset instead of garbage.
src/gallium/auxiliary/gallivm/lp_bld_sample.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
index 0fd014ab9b3632d6db2b061c35e6da52da59a9bd..655c4fb901a549c32c87a77afad9793b5302139e 100644
(file)
--- a/
src/gallium/auxiliary/gallivm/lp_bld_sample.c
+++ b/
src/gallium/auxiliary/gallivm/lp_bld_sample.c
@@
-179,6
+179,9
@@
lp_build_sample_offset(struct lp_build_context *bld,
LLVMValueRef y_offset = lp_build_mul(bld, y, y_stride);
offset = lp_build_add(bld, offset, y_offset);
}
+ else {
+ *out_j = bld->zero;
+ }
if (z && z_stride) {
LLVMValueRef z_offset = lp_build_mul(bld, z, z_stride);