1
0
Fork 0
forked from suyu/suyu

gl_rasterizer: Disable compute shaders on Intel

Intel's proprietary driver enters in a corrupt state when compute
shaders are executed. For now, disable these.
This commit is contained in:
ReinUsesLisp 2019-11-22 21:12:31 -03:00
parent 894ad74b87
commit 919ac2c4d3
No known key found for this signature in database
GPG key ID: 2DFC508897B39CFE
3 changed files with 12 additions and 0 deletions

View file

@ -74,6 +74,7 @@ Device::Device() {
const std::vector extensions = GetExtensions(); const std::vector extensions = GetExtensions();
const bool is_nvidia = vendor == "NVIDIA Corporation"; const bool is_nvidia = vendor == "NVIDIA Corporation";
const bool is_intel = vendor == "Intel";
// Reserve the first UBO for emulation bindings // Reserve the first UBO for emulation bindings
base_bindings[0] = BaseBindings{ReservedUniformBlocks, 0, 0, 0}; base_bindings[0] = BaseBindings{ReservedUniformBlocks, 0, 0, 0};
@ -110,6 +111,7 @@ Device::Device() {
has_variable_aoffi = TestVariableAoffi(); has_variable_aoffi = TestVariableAoffi();
has_component_indexing_bug = TestComponentIndexingBug(); has_component_indexing_bug = TestComponentIndexingBug();
has_precise_bug = TestPreciseBug(); has_precise_bug = TestPreciseBug();
has_broken_compute = is_intel;
has_fast_buffer_sub_data = is_nvidia; has_fast_buffer_sub_data = is_nvidia;
LOG_INFO(Render_OpenGL, "Renderer_VariableAOFFI: {}", has_variable_aoffi); LOG_INFO(Render_OpenGL, "Renderer_VariableAOFFI: {}", has_variable_aoffi);
@ -127,6 +129,7 @@ Device::Device(std::nullptr_t) {
has_image_load_formatted = true; has_image_load_formatted = true;
has_variable_aoffi = true; has_variable_aoffi = true;
has_component_indexing_bug = false; has_component_indexing_bug = false;
has_broken_compute = false;
has_precise_bug = false; has_precise_bug = false;
} }

View file

@ -76,6 +76,10 @@ public:
return has_precise_bug; return has_precise_bug;
} }
bool HasBrokenCompute() const {
return has_broken_compute;
}
bool HasFastBufferSubData() const { bool HasFastBufferSubData() const {
return has_fast_buffer_sub_data; return has_fast_buffer_sub_data;
} }
@ -97,6 +101,7 @@ private:
bool has_variable_aoffi{}; bool has_variable_aoffi{};
bool has_component_indexing_bug{}; bool has_component_indexing_bug{};
bool has_precise_bug{}; bool has_precise_bug{};
bool has_broken_compute{};
bool has_fast_buffer_sub_data{}; bool has_fast_buffer_sub_data{};
}; };

View file

@ -743,6 +743,10 @@ bool RasterizerOpenGL::DrawMultiBatch(bool is_indexed) {
} }
void RasterizerOpenGL::DispatchCompute(GPUVAddr code_addr) { void RasterizerOpenGL::DispatchCompute(GPUVAddr code_addr) {
if (device.HasBrokenCompute()) {
return;
}
buffer_cache.Acquire(); buffer_cache.Acquire();
auto kernel = shader_cache.GetComputeKernel(code_addr); auto kernel = shader_cache.GetComputeKernel(code_addr);