summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2012-11-17 21:23:28 -0800
committerIan Romanick <[email protected]>2013-01-15 13:34:00 -0800
commit8907b6a8e4461f6064e32ff5419053e74274e770 (patch)
treed2f9bfb17f73040659110f33003cc98e3bc78192 /configure.ac
parentf3db20da1a04fd64732c62631d59aac801a1a59d (diff)
mesa: Fix default value of BUFFER_ACCESS_FLAGS.
According to both the GL 3.0 and ES 3.0 specifications (table 2.7 for GL and table 2.8 for ES), the default value of BUFFER_ACCESS_FLAGS is supposed to be zero. Note that there are two related quantities: the obsolete BUFFER_ACCESS enum and the new BUFFER_ACCESS_FLAGS bitfield. BUFFER_ACCESS can only be GL_READ_ONLY, GL_WRITE_ONLY, or GL_READ_WRITE; BUFFER_ACCESS_FLAGS can easily represent all three via GL_MAP_WRITE_BIT, GL_MAP_READ_BIT, and their logical or. It also supports more flags. Thus, Mesa only stores the bitfield, and simply computes the old enum when queried, via simplified_access_mode(bufObj->AccessFlags). The tricky part is that, while BUFFER_ACCESS_FLAGS defaults to 0, BUFFER_ACCESS defaults to GL_READ_WRITE for desktop [GL 3.0, table 2.8] and GL_WRITE_ONLY_OES for ES [the GL_EXT_map_buffer_range extension]. Mesa tried to implement this by setting the default AccessFlags to GL_MAP_READ_BIT | GL_MAP_WRITE_BIT on desktop, and GL_MAP_WRITE_BIT on ES. But in all specifications, it needs to be 0. This patch moves that logic into simplified_access_mode(): when AccessFlags == 0, it now returns GL_READ_WRITE for desktop and GL_WRITE_ONLY for ES 1/2. (BUFFER_ACCESS doesn't exist on ES 3.0, so it's irrelevant there.) With that in place, it changes the AccessFlags default to 0. Fixes three es3conform tsets: - copy_buffer_defaults - map_buffer_range_modify_indices - pixel_buffer_object_default_parameters Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions