Can't make the texture immutable with no data
@@ -1905,7 +1905,7 @@ void skg_tex_set_contents_arr(skg_tex_t *tex, const void **data_frames, int32_t
desc.SampleDesc.Count = multisample;
desc.Format = (DXGI_FORMAT)skg_tex_fmt_to_native(tex->format);
desc.BindFlags = tex->type == skg_tex_type_depth ? D3D11_BIND_DEPTH_STENCIL : D3D11_BIND_SHADER_RESOURCE;
- desc.Usage = tex->use == skg_use_dynamic ? D3D11_USAGE_DYNAMIC : tex->type == skg_tex_type_rendertarget || tex->type == skg_tex_type_depth ? D3D11_USAGE_DEFAULT : D3D11_USAGE_IMMUTABLE;
+ desc.Usage = tex->use == skg_use_dynamic ? D3D11_USAGE_DYNAMIC : tex->type == skg_tex_type_rendertarget || tex->type == skg_tex_type_depth || data_frames != nullptr || data_frames[0] != nullptr ? D3D11_USAGE_DEFAULT : D3D11_USAGE_IMMUTABLE;
desc.CPUAccessFlags = tex->use == skg_use_dynamic ? D3D11_CPU_ACCESS_WRITE : 0;
if (tex->type == skg_tex_type_rendertarget) desc.BindFlags |= D3D11_BIND_RENDER_TARGET;
if (tex->type == skg_tex_type_cubemap ) desc.MiscFlags = D3D11_RESOURCE_MISC_TEXTURECUBE;
