mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Added error check for use of TextureFormat::BGRA8 in compute.
This commit is contained in:
parent
debfef1477
commit
a819a3f73e
1 changed files with 3 additions and 0 deletions
|
@ -3260,6 +3260,9 @@ namespace bgfx
|
|||
BGFX_API_FUNC(void setImage(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint8_t _mip, Access::Enum _access, TextureFormat::Enum _format) )
|
||||
{
|
||||
_format = TextureFormat::Count == _format ? TextureFormat::Enum(m_textureRef[_handle.idx].m_format) : _format;
|
||||
BX_CHECK(_format != TextureFormat::BGRA8
|
||||
, "Can't use TextureFormat::BGRA8 with compute, use TextureFormat::RGBA8 instead."
|
||||
);
|
||||
m_submit->setImage(_stage, _sampler, _handle, _mip, _access, _format);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue