GPU/OpenGL: Create the texture stream buffer with its final target
Fixes broken texture uploads on Adreno GPUs.
This commit is contained in:
parent
8bb89c9aeb
commit
fc28ba75da
|
@ -341,7 +341,10 @@ bool GPU_HW_OpenGL::CreateUniformBuffer()
|
||||||
bool GPU_HW_OpenGL::CreateTextureBuffer()
|
bool GPU_HW_OpenGL::CreateTextureBuffer()
|
||||||
{
|
{
|
||||||
// We use the pixel unpack buffer here because we share it with CPU-decoded VRAM writes.
|
// We use the pixel unpack buffer here because we share it with CPU-decoded VRAM writes.
|
||||||
m_texture_stream_buffer = GL::StreamBuffer::Create(GL_PIXEL_UNPACK_BUFFER, VRAM_UPDATE_TEXTURE_BUFFER_SIZE);
|
const GLenum target =
|
||||||
|
(m_use_ssbo_for_vram_writes ? GL_SHADER_STORAGE_BUFFER :
|
||||||
|
(m_supports_texture_buffer ? GL_TEXTURE_BUFFER : GL_PIXEL_UNPACK_BUFFER));
|
||||||
|
m_texture_stream_buffer = GL::StreamBuffer::Create(target, VRAM_UPDATE_TEXTURE_BUFFER_SIZE);
|
||||||
if (!m_texture_stream_buffer)
|
if (!m_texture_stream_buffer)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue