-
Fix glTexSubImage support of half-float extension formats. · 6b5038e7Nicolas Capens authored
GL_HALF_FLOAT_OES and GL_HALF_FLOAT have different enum values, and we weren't handling the case where a half-float texture was already created (e.g. with an effective internal format of GL_RGBA16F) and then updated with a glTexSubImage call using GL_HALF_FLOAT_OES type. In other words, we assumed the OpenGL ES 3.0 sized internal format could only be used with the OpenGL ES 3.0 half-float type, but this hasn't been true since we started storing only the effective internal format for all versions. Note that GL_OES_texture_half_float, which defines GL_HALF_FLOAT_OES, does not clarify whether HALF_FLOAT images can be updated using FLOAT, or vice-versa. We're assuming the equivalent combinations of OpenGL ES 3.0 table 3.3 are valid. That is, FLOAT can be used to update, HALF_FLOAT, but not the other way around. Bug b/74609191 Change-Id: Ib8548cd37065820eb59a0943fd39647edc5e9f1b Reviewed-on: https://swiftshader-review.googlesource.com/17748Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
6b5038e7
×