mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[gamecode] Invert the meaning of the skip matrix
Rather than specifying that the conversion should be skipped, it now specifies the mode of the conversions (with 0 being no conversion). This is in preparation for boolean conversion.
This commit is contained in:
parent
6f6f47e27e
commit
3eb2194343
1 changed files with 11 additions and 10 deletions
|
@ -34,22 +34,23 @@ vec_types = [
|
|||
"ulvec",
|
||||
None, # no such thing as unsigned double
|
||||
]
|
||||
skip_matrix = [
|
||||
convert_matrix = [
|
||||
#i f l d ui X ul X
|
||||
[1, 0, 0, 0, 1, 1, 0, 1], # i
|
||||
[0, 1, 0, 0, 0, 1, 0, 1], # f
|
||||
[0, 0, 1, 0, 0, 1, 1, 1], # l
|
||||
[0, 0, 0, 1, 0, 1, 0, 1], # d
|
||||
[0, 1, 1, 1, 0, 0, 1, 0], # i
|
||||
[1, 0, 1, 1, 1, 0, 1, 0], # f
|
||||
[1, 1, 0, 1, 1, 0, 0, 0], # l
|
||||
[1, 1, 1, 0, 1, 0, 1, 0], # d
|
||||
|
||||
[1, 0, 0, 0, 1, 1, 0, 1], # ui
|
||||
[1, 1, 1, 1, 1, 1, 1, 1], # X
|
||||
[0, 0, 1, 0, 0, 1, 1, 1], # ul
|
||||
[1, 1, 1, 1, 1, 1, 1, 1], # X
|
||||
[0, 1, 1, 1, 0, 0, 1, 0], # ui
|
||||
[0, 0, 0, 0, 0, 0, 0, 0], # X
|
||||
[1, 1, 0, 1, 1, 0, 0, 0], # ul
|
||||
[0, 0, 0, 0, 0, 0, 0, 0], # X
|
||||
]
|
||||
for width in range(4):
|
||||
for src_type in range(8):
|
||||
for dst_type in range(8):
|
||||
if skip_matrix[src_type][dst_type]:
|
||||
mode = convert_matrix[src_type][dst_type]
|
||||
if not mode:
|
||||
continue
|
||||
case = (width << 6) | (src_type << 3) | (dst_type)
|
||||
if width == 0:
|
||||
|
|
Loading…
Reference in a new issue