mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
Since high bits can be used for flags, mask them out.
This stops arbvpwarpmesh from segfaulting and it actually works - with immediate mode rendering.
This commit is contained in:
parent
3f0926b612
commit
19b260119a
1 changed files with 2 additions and 1 deletions
|
|
@ -39,6 +39,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#define SCALAR_FLAG (1<<31)
|
||||
#define FLAG_MASK (1<<31)
|
||||
#define OP_MASK (0xf) /* we are unlikely to have more than 15 */
|
||||
#define OPN(operator, ip, op) {#operator, VP_OPCODE_##operator, ip, op}
|
||||
|
||||
struct{
|
||||
|
|
@ -430,7 +431,7 @@ static unsigned long op_operands(enum vp_opcode opcode)
|
|||
/* Can we trust mesas opcodes to be in order ? */
|
||||
for(i=0; i < sizeof(op_names) / sizeof(*op_names); i++)
|
||||
if(op_names[i].opcode == opcode)
|
||||
return op_names[i].ip;
|
||||
return op_names[i].ip & OP_MASK;
|
||||
|
||||
fprintf(stderr, "op %d not found in op_names\n", opcode);
|
||||
exit(-1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue