32 lines
1.3 KiB
C++
32 lines
1.3 KiB
C++
$NetBSD$
|
|
|
|
--- gpu/command_buffer/service/external_vk_image_backing.cc.orig 2020-07-08 21:41:48.000000000 +0000
|
|
+++ gpu/command_buffer/service/external_vk_image_backing.cc
|
|
@@ -28,7 +28,7 @@
|
|
#include "ui/gl/gl_version_info.h"
|
|
#include "ui/gl/scoped_binders.h"
|
|
|
|
-#if defined(OS_LINUX) && BUILDFLAG(USE_DAWN)
|
|
+#if (defined(OS_LINUX) || defined(OS_BSD)) && BUILDFLAG(USE_DAWN)
|
|
#include "gpu/command_buffer/service/external_vk_image_dawn_representation.h"
|
|
#endif
|
|
|
|
@@ -475,7 +475,7 @@ std::unique_ptr<SharedImageRepresentatio
|
|
ExternalVkImageBacking::ProduceDawn(SharedImageManager* manager,
|
|
MemoryTypeTracker* tracker,
|
|
WGPUDevice wgpuDevice) {
|
|
-#if defined(OS_LINUX) && BUILDFLAG(USE_DAWN)
|
|
+#if (defined(OS_LINUX) || defined(OS_BSD)) && BUILDFLAG(USE_DAWN)
|
|
auto wgpu_format = viz::ToWGPUFormat(format());
|
|
|
|
if (wgpu_format == WGPUTextureFormat_Undefined) {
|
|
@@ -507,7 +507,7 @@ GLuint ExternalVkImageBacking::ProduceGL
|
|
gl::GLApi* api = gl::g_current_gl_context;
|
|
base::Optional<ScopedDedicatedMemoryObject> memory_object;
|
|
if (!use_separate_gl_texture()) {
|
|
-#if defined(OS_LINUX) || defined(OS_ANDROID)
|
|
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
|
|
auto memory_fd = image_->GetMemoryFd();
|
|
if (!memory_fd.is_valid())
|
|
return 0;
|