diff --git a/examples/09-hdr/hdr.cpp b/examples/09-hdr/hdr.cpp index 14f6edca..047fb0aa 100644 --- a/examples/09-hdr/hdr.cpp +++ b/examples/09-hdr/hdr.cpp @@ -205,7 +205,7 @@ class HDR : public entry::AppI m_mesh = meshLoad("meshes/bunny.bin"); m_fbtextures[0] = bgfx::createTexture2D(m_width, m_height, 1, bgfx::TextureFormat::BGRA8, BGFX_TEXTURE_RT|BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP); - m_fbtextures[1] = bgfx::createTexture2D(m_width, m_height, 1, bgfx::TextureFormat::D16, BGFX_TEXTURE_RT_BUFFER_ONLY); + m_fbtextures[1] = bgfx::createTexture2D(m_width, m_height, 1, bgfx::TextureFormat::D16, BGFX_TEXTURE_RT_WRITE_ONLY); m_fbh = bgfx::createFrameBuffer(BX_COUNTOF(m_fbtextures), m_fbtextures, true); m_lum[0] = bgfx::createFrameBuffer(128, 128, bgfx::TextureFormat::BGRA8); @@ -308,7 +308,7 @@ class HDR : public entry::AppI bgfx::destroyFrameBuffer(m_fbh); m_fbtextures[0] = bgfx::createTexture2D(m_width, m_height, 1, bgfx::TextureFormat::BGRA8, ( (msaa+1)<m_device->CreateShaderResourceView(m_ptr, &srvd, &m_srv) ); } diff --git a/src/renderer_d3d12.cpp b/src/renderer_d3d12.cpp index eb9c1cd9..b9a5aa91 100644 --- a/src/renderer_d3d12.cpp +++ b/src/renderer_d3d12.cpp @@ -1860,8 +1860,8 @@ data.NumQualityLevels = 0; if (isValid(frameBuffer.m_depth) ) { TextureD3D12& texture = m_textures[frameBuffer.m_depth.idx]; - const bool bufferOnly = 0 != (texture.m_flags&BGFX_TEXTURE_RT_BUFFER_ONLY); - if (!bufferOnly) + const bool writeOnly = 0 != (texture.m_flags&BGFX_TEXTURE_RT_WRITE_ONLY); + if (!writeOnly) { texture.setState(m_commandList, D3D12_RESOURCE_STATE_DEPTH_READ); } @@ -3801,7 +3801,7 @@ data.NumQualityLevels = 0; blockHeight = blockInfo.blockHeight; } - const bool bufferOnly = 0 != (m_flags&BGFX_TEXTURE_RT_BUFFER_ONLY); + const bool writeOnly = 0 != (m_flags&BGFX_TEXTURE_RT_WRITE_ONLY); const bool computeWrite = 0 != (m_flags&BGFX_TEXTURE_COMPUTE_WRITE); const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK); @@ -3813,7 +3813,7 @@ data.NumQualityLevels = 0; , textureHeight , imageContainer.m_cubeMap ? "x6" : "" , renderTarget ? 'x' : ' ' - , bufferOnly ? 'x' : ' ' + , writeOnly ? 'x' : ' ' , computeWrite ? 'x' : ' ' , swizzle ? " (swizzle BGRA8 -> RGBA8)" : "" ); @@ -3969,7 +3969,7 @@ data.NumQualityLevels = 0; resourceDesc.Flags |= D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET; } - if (bufferOnly) + if (writeOnly) { resourceDesc.Flags |= D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE; state &= ~D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE; diff --git a/src/renderer_d3d9.cpp b/src/renderer_d3d9.cpp index 788cd930..9ae51d59 100644 --- a/src/renderer_d3d9.cpp +++ b/src/renderer_d3d9.cpp @@ -2431,10 +2431,10 @@ namespace bgfx { namespace d3d9 uint32_t msaaQuality = ( (m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT); msaaQuality = bx::uint32_satsub(msaaQuality, 1); - bool bufferOnly = 0 != (m_flags&BGFX_TEXTURE_RT_BUFFER_ONLY); + bool writeOnly = 0 != (m_flags&BGFX_TEXTURE_RT_WRITE_ONLY); if (0 != msaaQuality - || bufferOnly) + || writeOnly) { const Msaa& msaa = s_msaa[msaaQuality]; @@ -2465,7 +2465,7 @@ namespace bgfx { namespace d3d9 ) ); } - if (bufferOnly) + if (writeOnly) { // This is render buffer, there is no sampling, no need // to create texture. @@ -2841,7 +2841,7 @@ namespace bgfx { namespace d3d9 , 0 != (m_flags&BGFX_TEXTURE_RT_MASK) ? " (render target)" : "" ); - if (0 != (_flags&BGFX_TEXTURE_RT_BUFFER_ONLY) ) + if (0 != (_flags&BGFX_TEXTURE_RT_WRITE_ONLY) ) { return; } diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 44b73e2d..bef9328e 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -3948,10 +3948,10 @@ namespace bgfx { namespace gl m_requestedFormat = m_textureFormat = uint8_t(_format); - const bool bufferOnly = 0 != (m_flags&BGFX_TEXTURE_RT_BUFFER_ONLY); + const bool writeOnly = 0 != (m_flags&BGFX_TEXTURE_RT_WRITE_ONLY); const bool computeWrite = 0 != (m_flags&BGFX_TEXTURE_COMPUTE_WRITE ); - if (!bufferOnly) + if (!writeOnly) { GL_CHECK(glGenTextures(1, &m_id) ); BX_CHECK(0 != m_id, "Failed to generate texture id."); @@ -4025,7 +4025,7 @@ namespace bgfx { namespace gl msaaQuality = bx::uint32_min(s_renderGL->m_maxMsaa, msaaQuality == 0 ? 0 : 1<