projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9809a3
)
[965] Fix fp temp reg release code to not usually release all temps.
author
Andrzej Trznadel
<Andrzej.Trznadel@intel.com>
Mon, 17 Mar 2008 22:54:24 +0000
(15:54 -0700)
committer
Eric Anholt
<eric@anholt.net>
Mon, 17 Mar 2008 22:56:26 +0000
(15:56 -0700)
Also, use wrapped ffs() instead of native.
src/mesa/drivers/dri/i965/brw_wm_fp.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/i965/brw_wm_fp.c
b/src/mesa/drivers/dri/i965/brw_wm_fp.c
index 682b16d74ddc64d2d509206ab2c3b5042db9cb53..621106f14dc830acfdf1cdf74a37bf48f1de037a 100644
(file)
--- a/
src/mesa/drivers/dri/i965/brw_wm_fp.c
+++ b/
src/mesa/drivers/dri/i965/brw_wm_fp.c
@@
-144,7
+144,7
@@
static struct prog_dst_register dst_undef( void )
static struct prog_dst_register get_temp( struct brw_wm_compile *c )
{
- int bit = ffs( ~c->fp_temp );
+ int bit =
_mesa_
ffs( ~c->fp_temp );
if (!bit) {
_mesa_printf("%s: out of temporaries\n", __FILE__);
@@
-158,7
+158,7
@@
static struct prog_dst_register get_temp( struct brw_wm_compile *c )
static void release_temp( struct brw_wm_compile *c, struct prog_dst_register temp )
{
- c->fp_temp &= ~
1<<(temp.Index + 1 - FIRST_INTERNAL_TEMP
);
+ c->fp_temp &= ~
(1 << (temp.Index - FIRST_INTERNAL_TEMP)
);
}