mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 04:38:30 +09:00
[Fix, Test] (ShaderTranspiler, DirectGLES): never widen a buffer image - its texels are the application buffer, not storage we can reallocate
This commit is contained in:
@@ -1482,8 +1482,15 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
// a bind format that names a class the storage does not have is left alone: GL
|
||||
// already calls that undefined, and inventing a carrier for it would only make the
|
||||
// out-of-class read wider.
|
||||
//
|
||||
// A BUFFER texture is excluded on both sides: it has no storage of its own to widen
|
||||
// (its texels are the application's buffer object), so WidenImageFormatsPass declines
|
||||
// every buffer image and the bind must decline with it, or the driver would be handed
|
||||
// a carrier the shader never addressed. See the Dim::Buffer guard there for the
|
||||
// 32-byte GL_RG32F measurement that pinned it.
|
||||
GLenum bindFormat = imageBinding.Format;
|
||||
if (TextureImpl::GetImageBindableStorageWidening(imageBinding.Texture->GetFormat())) {
|
||||
if (imageBinding.Texture->GetTarget() != TextureTarget::TextureBuffer &&
|
||||
TextureImpl::GetImageBindableStorageWidening(imageBinding.Texture->GetFormat())) {
|
||||
const auto boundFormatWidening = TextureImpl::GetImageBindableStorageWidening(
|
||||
MG_Util::ConvertGLEnumToTextureInternalFormat(imageBinding.Format));
|
||||
if (boundFormatWidening) {
|
||||
|
||||
Reference in New Issue
Block a user