gl_texture_cache: Avoid format views on Intel and AMD
Intel and AMD proprietary drivers are incapable of rendering to texture views of different formats than the original texture. Avoid creating these at a cache level. This will consume more memory, emulating them with copies.
This commit is contained in:
parent
3a49c1a691
commit
7d904fef2e
11 changed files with 48 additions and 21 deletions
|
@ -208,6 +208,7 @@ Device::Device()
|
|||
|
||||
const bool is_nvidia = vendor == "NVIDIA Corporation";
|
||||
const bool is_amd = vendor == "ATI Technologies Inc.";
|
||||
const bool is_intel = vendor == "Intel";
|
||||
|
||||
bool disable_fast_buffer_sub_data = false;
|
||||
if (is_nvidia && version == "4.6.0 NVIDIA 443.24") {
|
||||
|
@ -231,6 +232,7 @@ Device::Device()
|
|||
has_variable_aoffi = TestVariableAoffi();
|
||||
has_component_indexing_bug = is_amd;
|
||||
has_precise_bug = TestPreciseBug();
|
||||
has_broken_texture_view_formats = is_amd || is_intel;
|
||||
has_nv_viewport_array2 = GLAD_GL_NV_viewport_array2;
|
||||
has_vertex_buffer_unified_memory = GLAD_GL_NV_vertex_buffer_unified_memory;
|
||||
has_debugging_tool_attached = IsDebugToolAttached(extensions);
|
||||
|
@ -248,6 +250,8 @@ Device::Device()
|
|||
LOG_INFO(Render_OpenGL, "Renderer_VariableAOFFI: {}", has_variable_aoffi);
|
||||
LOG_INFO(Render_OpenGL, "Renderer_ComponentIndexingBug: {}", has_component_indexing_bug);
|
||||
LOG_INFO(Render_OpenGL, "Renderer_PreciseBug: {}", has_precise_bug);
|
||||
LOG_INFO(Render_OpenGL, "Renderer_BrokenTextureViewFormats: {}",
|
||||
has_broken_texture_view_formats);
|
||||
|
||||
if (Settings::values.use_assembly_shaders.GetValue() && !use_assembly_shaders) {
|
||||
LOG_ERROR(Render_OpenGL, "Assembly shaders enabled but not supported");
|
||||
|
|
|
@ -96,6 +96,10 @@ public:
|
|||
return has_precise_bug;
|
||||
}
|
||||
|
||||
bool HasBrokenTextureViewFormats() const {
|
||||
return has_broken_texture_view_formats;
|
||||
}
|
||||
|
||||
bool HasFastBufferSubData() const {
|
||||
return has_fast_buffer_sub_data;
|
||||
}
|
||||
|
@ -137,6 +141,7 @@ private:
|
|||
bool has_variable_aoffi{};
|
||||
bool has_component_indexing_bug{};
|
||||
bool has_precise_bug{};
|
||||
bool has_broken_texture_view_formats{};
|
||||
bool has_fast_buffer_sub_data{};
|
||||
bool has_nv_viewport_array2{};
|
||||
bool has_debugging_tool_attached{};
|
||||
|
|
|
@ -430,6 +430,8 @@ TextureCacheRuntime::TextureCacheRuntime(const Device& device_, ProgramManager&
|
|||
format_properties[i].emplace(format, properties);
|
||||
}
|
||||
}
|
||||
has_broken_texture_view_formats = device.HasBrokenTextureViewFormats();
|
||||
|
||||
null_image_1d_array.Create(GL_TEXTURE_1D_ARRAY);
|
||||
null_image_cube_array.Create(GL_TEXTURE_CUBE_MAP_ARRAY);
|
||||
null_image_3d.Create(GL_TEXTURE_3D);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue