diff options
author | Gurchetan Singh <gurchetansingh@chromium.org> | 2019-08-02 14:39:36 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-20 17:46:26 +0000 |
commit | 5ce68e42ca69d145bf32d7861c7d8715ab1da987 (patch) | |
tree | f0c22fe467474c26eff8e4c96aac151ce36a366f /gpu_renderer/src/pipe_format_fourcc.rs | |
parent | 593dc3b34e4c23178fa4a8abd6c2d53b89e051a1 (diff) | |
download | crosvm-5ce68e42ca69d145bf32d7861c7d8715ab1da987.tar crosvm-5ce68e42ca69d145bf32d7861c7d8715ab1da987.tar.gz crosvm-5ce68e42ca69d145bf32d7861c7d8715ab1da987.tar.bz2 crosvm-5ce68e42ca69d145bf32d7861c7d8715ab1da987.tar.lz crosvm-5ce68e42ca69d145bf32d7861c7d8715ab1da987.tar.xz crosvm-5ce68e42ca69d145bf32d7861c7d8715ab1da987.tar.zst crosvm-5ce68e42ca69d145bf32d7861c7d8715ab1da987.zip |
devices: gpu: remove BackedBuffer/GpuRendererResource distinction
We always advertise VIRTIO_GPU_F_VIRGL and don't activate the worker thread if Renderer::init fails. We're unlikely to encounter an platform where we can initialize a GBM device, but can't initialize virglrenderer. Since our virtio-gpu implementation depends on virglrenderer, we can pipe 2D hypercalls to virglrenderer (QEMU does this too, when built with the --enable-virglrenderer option). Also remove virgl_renderer_resource_info since it's unlikely to work with non-Mesa drivers. BUG=chromium:906811 TEST=kmscube renders correctly (though there's a prior bug in closing the rendering window -- see chromium:991830) Change-Id: I7851cd0837fd226f523f81c5b4a3389dc85f3e4f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1743219 Tested-by: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org> Auto-Submit: Gurchetan Singh <gurchetansingh@chromium.org>
Diffstat (limited to 'gpu_renderer/src/pipe_format_fourcc.rs')
-rw-r--r-- | gpu_renderer/src/pipe_format_fourcc.rs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/gpu_renderer/src/pipe_format_fourcc.rs b/gpu_renderer/src/pipe_format_fourcc.rs deleted file mode 100644 index 5a93167..0000000 --- a/gpu_renderer/src/pipe_format_fourcc.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2018 The Chromium OS Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -use crate::generated::p_format; - -macro_rules! fourcc { - ($a:expr, $b:expr, $c:expr, $d:expr) => { - Some($a as u32 | ($b as u32) << 8 | ($c as u32) << 16 | ($d as u32) << 24) - }; -} - -/// Gets the fourcc that corresponds to the given pipe format, or `None` if the format is -/// unrecognized. -pub fn pipe_format_fourcc(f: p_format::pipe_format) -> Option<u32> { - match f { - p_format::PIPE_FORMAT_B8G8R8A8_UNORM => fourcc!('A', 'R', '2', '4'), - p_format::PIPE_FORMAT_B8G8R8X8_UNORM => fourcc!('X', 'R', '2', '4'), - p_format::PIPE_FORMAT_R8G8B8A8_UNORM => fourcc!('A', 'B', '2', '4'), - p_format::PIPE_FORMAT_R8G8B8X8_UNORM => fourcc!('X', 'B', '2', '4'), - p_format::PIPE_FORMAT_B5G6R5_UNORM => fourcc!('R', 'G', '1', '6'), - // p_format::PIPE_FORMAT_R8_UNORM => fourcc!('R', '8', ' ', ' '), - // p_format::PIPE_FORMAT_G8R8_UNORM => fourcc!('R', 'G', '8', '8'), - _ => None, - } -} |