mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07:00
Fixes GL internal format of textures in compute
In compute shaders load/store operations requires sized formats.
This commit is contained in:
parent
b3165505b6
commit
e2f5b20922
2 changed files with 7 additions and 1 deletions
|
|
@ -215,7 +215,7 @@ void CPostprocManager::InitializePBR()
|
|||
LOGWARNING("%s is unsupported", framebufferFormatName);
|
||||
}
|
||||
|
||||
if (m_Device->GetCapabilities().computeShaders && m_Device->GetCapabilities().storage)
|
||||
if (m_Device->GetCapabilities().computeShaders)
|
||||
{
|
||||
m_ResolvePBRComputeTech = g_Renderer.GetShaderManager().LoadEffect(str_compute_resolve_pbr);
|
||||
if (m_ResolvePBRComputeTech)
|
||||
|
|
|
|||
|
|
@ -174,6 +174,12 @@ std::unique_ptr<CTexture> CTexture::Create(
|
|||
// pixel format.
|
||||
GLenum pixelFormat = GL_RGBA;
|
||||
GLenum pixelType = GL_UNSIGNED_BYTE;
|
||||
#if !CONFIG2_GLES
|
||||
// load/store operation requires sized formats. See Table 8.25:
|
||||
// https://registry.khronos.org/OpenGL/specs/gl/glspec43.core.pdf
|
||||
if (usage & ITexture::Usage::STORAGE)
|
||||
internalFormat = GL_RGBA8;
|
||||
#endif
|
||||
switch (format)
|
||||
{
|
||||
case Format::UNDEFINED:
|
||||
|
|
|
|||
Loading…
Reference in a new issue