D3D12: Fixed initial state for BGFX_TEXTURE_BLIT_DST texture.
This commit is contained in:
Родитель
0e532da452
Коммит
728f1022f8
|
@ -1823,8 +1823,12 @@ namespace bgfx { namespace d3d12
|
||||||
bx::memCopy(m_uniforms[_loc], _data, _size);
|
bx::memCopy(m_uniforms[_loc], _data, _size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setMarker(const char* /*_marker*/, uint32_t /*_size*/) override
|
void setMarker(const char* _marker, uint32_t /*_size*/) override
|
||||||
{
|
{
|
||||||
|
if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX))
|
||||||
|
{
|
||||||
|
PIX3_SETMARKER(m_commandList, D3DCOLOR_MARKER, _marker);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override
|
void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override
|
||||||
|
@ -4349,6 +4353,7 @@ data.NumQualityLevels = 0;
|
||||||
const bool writeOnly = 0 != (m_flags&BGFX_TEXTURE_RT_WRITE_ONLY);
|
const bool writeOnly = 0 != (m_flags&BGFX_TEXTURE_RT_WRITE_ONLY);
|
||||||
const bool computeWrite = 0 != (m_flags&BGFX_TEXTURE_COMPUTE_WRITE);
|
const bool computeWrite = 0 != (m_flags&BGFX_TEXTURE_COMPUTE_WRITE);
|
||||||
const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK);
|
const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK);
|
||||||
|
const bool blit = 0 != (m_flags&BGFX_TEXTURE_BLIT_DST);
|
||||||
|
|
||||||
BX_TRACE("Texture %3d: %s (requested: %s), %dx%d%s RT[%c], BO[%c], CW[%c]%s."
|
BX_TRACE("Texture %3d: %s (requested: %s), %dx%d%s RT[%c], BO[%c], CW[%c]%s."
|
||||||
, this - s_renderD3D12->m_textures
|
, this - s_renderD3D12->m_textures
|
||||||
|
@ -4524,6 +4529,11 @@ data.NumQualityLevels = 0;
|
||||||
resourceDesc.Flags |= D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;
|
resourceDesc.Flags |= D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (blit)
|
||||||
|
{
|
||||||
|
state = D3D12_RESOURCE_STATE_COPY_DEST;
|
||||||
|
}
|
||||||
|
|
||||||
switch (m_type)
|
switch (m_type)
|
||||||
{
|
{
|
||||||
case Texture2D:
|
case Texture2D:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче