mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 17:01:24 +12:00
gl: API compliance fixes
- Do not assume texture2D when creating new textures - Flag invalid texture cache if readonly texture is trampled by fbo memory. Avoids binding a stale handle to the pipeline and is rare enough that it should not hurt performance
This commit is contained in:
parent
2821915eae
commit
b9cca71c47
6 changed files with 43 additions and 18 deletions
|
@ -8,6 +8,18 @@
|
|||
|
||||
namespace gl
|
||||
{
|
||||
GLenum get_target(rsx::texture_dimension_extended type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case rsx::texture_dimension_extended::texture_dimension_1d: return GL_TEXTURE_1D;
|
||||
case rsx::texture_dimension_extended::texture_dimension_2d: return GL_TEXTURE_2D;
|
||||
case rsx::texture_dimension_extended::texture_dimension_cubemap: return GL_TEXTURE_CUBE_MAP;
|
||||
case rsx::texture_dimension_extended::texture_dimension_3d: return GL_TEXTURE_3D;
|
||||
}
|
||||
fmt::throw_exception("Unknown texture target" HERE);
|
||||
}
|
||||
|
||||
GLenum get_sized_internal_format(u32 texture_format)
|
||||
{
|
||||
switch (texture_format)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue