projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60adc15
)
softpipe: use one fewer divide in sample_cube
author
Keith Whitwell
<keithw@vmware.com>
Sun, 23 Aug 2009 18:28:34 +0000
(19:28 +0100)
committer
Keith Whitwell
<keithw@vmware.com>
Mon, 24 Aug 2009 07:26:33 +0000
(08:26 +0100)
GCC won't do this for us. Makes a bigger difference to cubemap fps
than previous set of compilcated rearrangements.
src/gallium/drivers/softpipe/sp_tex_sample.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/softpipe/sp_tex_sample.c
b/src/gallium/drivers/softpipe/sp_tex_sample.c
index 3bc4599e04593202cd17bd936e9e6249fdbfdfa4..50460df7cdf999b38381297f56a1023d0e4604fe 100644
(file)
--- a/
src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/
src/gallium/drivers/softpipe/sp_tex_sample.c
@@
-1543,9
+1543,12
@@
sample_cube(struct tgsi_sampler *tgsi_sampler,
}
}
- ssss[j] = ( sc / ma + 1.0F ) * 0.5F;
- tttt[j] = ( tc / ma + 1.0F ) * 0.5F;
- samp->faces[j] = face;
+ {
+ const float ima = 1.0 / ma;
+ ssss[j] = ( sc * ima + 1.0F ) * 0.5F;
+ tttt[j] = ( tc * ima + 1.0F ) * 0.5F;
+ samp->faces[j] = face;
+ }
}
/* In our little pipeline, the compare stage is next. If compare