24930b382a
This patch adds a workaround on the GL error when we use glTextureView() on a GL texture which is created outside DAWN and not configured by glTexStorage*d(). glTextureView() is only allowed to be used on the textures configured by glTexStorage*D(). When the external GL texture is configured by glTexImage2D() (for example, textures from GLFW), calling glTextureView() will cause an INVALID_OPERATION error. To workaround this issue, we refer the solution on the Metal backend that we avoid calling glTextureView() on the following senarios: 1. We may call glTextureView() only when the usage of the texture includes Sampled or Storage. 2. We won't call glTextureView() if the view uses the same format as the original texture, the whole mipmap levels and array slices. BUG=dawn:16 Change-Id: Ibdfaa122ac061a2e2bb47f76e0030f1d0fc548a2 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5780 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> |
||
---|---|---|
.. | ||
common | ||
dawn | ||
dawn_native | ||
dawn_wire | ||
fuzzers | ||
include | ||
tests | ||
utils |