"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/util/format/u_format_parse.py" between
mesa-20.0.0-rc2.tar.xz and mesa-20.0.0-rc3.tar.xz

About: Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics (main library code). Release candidate.

u_format_parse.py  (mesa-20.0.0-rc2.tar.xz):u_format_parse.py  (mesa-20.0.0-rc3.tar.xz)
skipping to change at line 375 skipping to change at line 375
le_channels = _parse_channels(fields[5:9], layout, colorspace, le_swizzl es) le_channels = _parse_channels(fields[5:9], layout, colorspace, le_swizzl es)
be_swizzles = [_swizzle_parse_map[swizzle] for swizzle in fields[15]] be_swizzles = [_swizzle_parse_map[swizzle] for swizzle in fields[15]]
be_channels = _parse_channels(fields[11:15], layout, colorspace, be_swiz zles) be_channels = _parse_channels(fields[11:15], layout, colorspace, be_swiz zles)
le_shift = 0 le_shift = 0
for channel in le_channels: for channel in le_channels:
channel.shift = le_shift channel.shift = le_shift
le_shift += channel.size le_shift += channel.size
be_shift = 0
for channel in be_channels[3::-1]:
channel.shift = be_shift
be_shift += channel.size
assert le_shift == be_shift
for i in range(4): for i in range(4):
assert (le_swizzles[i] != SWIZZLE_NONE) == (be_swizzles[i] != SWIZZL E_NONE) assert (le_swizzles[i] != SWIZZLE_NONE) == (be_swizzles[i] != SWIZZL E_NONE)
format = Format(name, layout, block_width, block_height, block_depth, le _channels, le_swizzles, be_channels, be_swizzles, colorspace) format = Format(name, layout, block_width, block_height, block_depth, le _channels, le_swizzles, be_channels, be_swizzles, colorspace)
if format.is_array() and not format.is_bitmask():
# Formats accessed as arrays by the pack functions (R32G32_FLOAT or
# R8G8B8_UNORM, for example) should not be channel-ordering-reversed
# for BE.
# Note that __eq__ on channels ignores .shift!
assert(format.be_channels == format.le_channels)
assert(format.be_swizzles == format.le_swizzles)
format.be_channels = format.le_channels
else:
be_shift = 0
for channel in format.be_channels[3::-1]:
channel.shift = be_shift
be_shift += channel.size
assert le_shift == be_shift
formats.append(format) formats.append(format)
return formats return formats
 End of changes. 2 change blocks. 
17 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)