소스 검색

GL: FIxed binding compute RO image.

Бранимир Караџић 7 년 전
부모
커밋
197eae86c9
1개의 변경된 파일10개의 추가작업 그리고 18개의 파일을 삭제
  1. 10 18
      src/renderer_gl.cpp

+ 10 - 18
src/renderer_gl.cpp

@@ -6569,24 +6569,16 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
 
 								case Binding::Image:
 									{
-										if (Access::Read == bind.m_access)
-										{
-											TextureGL& texture = m_textures[bind.m_idx];
-											texture.commit(ii, uint32_t(texture.m_flags), _render->m_colorPalette);
-										}
-										else
-										{
-											const TextureGL& texture = m_textures[bind.m_idx];
-											GL_CHECK(glBindImageTexture(ii
-												, texture.m_id
-												, bind.m_mip
-												, texture.isCubeMap() ? GL_TRUE : GL_FALSE
-												, 0
-												, s_access[bind.m_access]
-												, s_imageFormat[bind.m_format])
-												);
-											barrier |= GL_SHADER_IMAGE_ACCESS_BARRIER_BIT;
-										}
+										const TextureGL& texture = m_textures[bind.m_idx];
+										GL_CHECK(glBindImageTexture(ii
+											, texture.m_id
+											, bind.m_mip
+											, texture.isCubeMap() || texture.m_target == GL_TEXTURE_2D_ARRAY ? GL_TRUE : GL_FALSE
+											, 0
+											, s_access[bind.m_access]
+											, s_imageFormat[bind.m_format])
+											);
+										barrier |= GL_SHADER_IMAGE_ACCESS_BARRIER_BIT;
 									}
 									break;