projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8ee45e
)
i965: fix up asserts in brw_inst_set_jip()
author
Timothy Arceri
<t_arceri@yahoo.com.au>
Thu, 26 Jan 2017 02:50:41 +0000
(13:50 +1100)
committer
Timothy Arceri
<t_arceri@yahoo.com.au>
Sun, 29 Jan 2017 23:17:46 +0000
(10:17 +1100)
We are casting from a signed 32bit int to an unsigned 16bit int
so shift 15 bits rather than 16.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_inst.h
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/i965/brw_inst.h
b/src/mesa/drivers/dri/i965/brw_inst.h
index
13fce97
..
bcb6786
100644
(file)
--- a/
src/mesa/drivers/dri/i965/brw_inst.h
+++ b/
src/mesa/drivers/dri/i965/brw_inst.h
@@
-283,8
+283,8
@@
brw_inst_set_jip(const struct gen_device_info *devinfo,
if (devinfo->gen >= 8) {
brw_inst_set_bits(inst, 127, 96, (uint32_t)value);
} else {
- assert(value <= (1 << 1
6
) - 1);
- assert(value >
-(1 << 16
));
+ assert(value <= (1 << 1
5
) - 1);
+ assert(value >
= -(1 << 15
));
brw_inst_set_bits(inst, 111, 96, (uint16_t)value);
}
}