1*bbecb9d1SAndroid Build Coastguard Worker /* 2*bbecb9d1SAndroid Build Coastguard Worker * Copyright 2020 Chromium 3*bbecb9d1SAndroid Build Coastguard Worker * 4*bbecb9d1SAndroid Build Coastguard Worker * Permission is hereby granted, free of charge, to any person obtaining a 5*bbecb9d1SAndroid Build Coastguard Worker * copy of this software and associated documentation files (the "Software"), 6*bbecb9d1SAndroid Build Coastguard Worker * to deal in the Software without restriction, including without limitation 7*bbecb9d1SAndroid Build Coastguard Worker * on the rights to use, copy, modify, merge, publish, distribute, sub 8*bbecb9d1SAndroid Build Coastguard Worker * license, and/or sell copies of the Software, and to permit persons to whom 9*bbecb9d1SAndroid Build Coastguard Worker * the Software is furnished to do so, subject to the following conditions: 10*bbecb9d1SAndroid Build Coastguard Worker * 11*bbecb9d1SAndroid Build Coastguard Worker * The above copyright notice and this permission notice (including the next 12*bbecb9d1SAndroid Build Coastguard Worker * paragraph) shall be included in all copies or substantial portions of the 13*bbecb9d1SAndroid Build Coastguard Worker * Software. 14*bbecb9d1SAndroid Build Coastguard Worker * 15*bbecb9d1SAndroid Build Coastguard Worker * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16*bbecb9d1SAndroid Build Coastguard Worker * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17*bbecb9d1SAndroid Build Coastguard Worker * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 18*bbecb9d1SAndroid Build Coastguard Worker * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, 19*bbecb9d1SAndroid Build Coastguard Worker * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 20*bbecb9d1SAndroid Build Coastguard Worker * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 21*bbecb9d1SAndroid Build Coastguard Worker * USE OR OTHER DEALINGS IN THE SOFTWARE. 22*bbecb9d1SAndroid Build Coastguard Worker */ 23*bbecb9d1SAndroid Build Coastguard Worker 24*bbecb9d1SAndroid Build Coastguard Worker #ifndef VENUS_HW_H 25*bbecb9d1SAndroid Build Coastguard Worker #define VENUS_HW_H 26*bbecb9d1SAndroid Build Coastguard Worker 27*bbecb9d1SAndroid Build Coastguard Worker #include <stdint.h> 28*bbecb9d1SAndroid Build Coastguard Worker 29*bbecb9d1SAndroid Build Coastguard Worker #ifdef VIRGL_RENDERER_UNSTABLE_APIS 30*bbecb9d1SAndroid Build Coastguard Worker struct virgl_renderer_capset_venus { 31*bbecb9d1SAndroid Build Coastguard Worker uint32_t wire_format_version; 32*bbecb9d1SAndroid Build Coastguard Worker uint32_t vk_xml_version; 33*bbecb9d1SAndroid Build Coastguard Worker uint32_t vk_ext_command_serialization_spec_version; 34*bbecb9d1SAndroid Build Coastguard Worker uint32_t vk_mesa_venus_protocol_spec_version; 35*bbecb9d1SAndroid Build Coastguard Worker 36*bbecb9d1SAndroid Build Coastguard Worker /* This flag indicates render server config, and will be needed until drm 37*bbecb9d1SAndroid Build Coastguard Worker * virtio-gpu blob mem gets fixed to attach_resource before resource_map. 38*bbecb9d1SAndroid Build Coastguard Worker */ 39*bbecb9d1SAndroid Build Coastguard Worker uint32_t supports_blob_id_0; 40*bbecb9d1SAndroid Build Coastguard Worker 41*bbecb9d1SAndroid Build Coastguard Worker /* Extension number N, where N is defined by the Vulkan spec, corresponds 42*bbecb9d1SAndroid Build Coastguard Worker * to bit [N / 32] & (1 << N % 32). The below mask1 covers the first 1023 43*bbecb9d1SAndroid Build Coastguard Worker * Vulkan extensions (numbered from 1 to 1023). 44*bbecb9d1SAndroid Build Coastguard Worker * 45*bbecb9d1SAndroid Build Coastguard Worker * Bit (mask1[0] & 0x1) is used for backward compatibility purpose. When 46*bbecb9d1SAndroid Build Coastguard Worker * that bit is set, the extension mask(s) are valid. Otherwise, all the 47*bbecb9d1SAndroid Build Coastguard Worker * extensions are assumed to be supported by the renderer side protocol. 48*bbecb9d1SAndroid Build Coastguard Worker */ 49*bbecb9d1SAndroid Build Coastguard Worker uint32_t vk_extension_mask1[32]; 50*bbecb9d1SAndroid Build Coastguard Worker 51*bbecb9d1SAndroid Build Coastguard Worker /* The single-threaded renderer cannot afford potential blocking calls. It 52*bbecb9d1SAndroid Build Coastguard Worker * also leads to GPU lost if the wait depends on a following command. This 53*bbecb9d1SAndroid Build Coastguard Worker * capset allows such blocking calls to passthrough from the clients, and 54*bbecb9d1SAndroid Build Coastguard Worker * shifts the responsibilities to the client drivers. 55*bbecb9d1SAndroid Build Coastguard Worker */ 56*bbecb9d1SAndroid Build Coastguard Worker uint32_t allow_vk_wait_syncs; 57*bbecb9d1SAndroid Build Coastguard Worker 58*bbecb9d1SAndroid Build Coastguard Worker /* This flag indicates that the renderer supports multiple fencing 59*bbecb9d1SAndroid Build Coastguard Worker * timelines. The client driver is expected to associate each VkQueue with 60*bbecb9d1SAndroid Build Coastguard Worker * one of these timelines at queue creation by binding it with an unused 61*bbecb9d1SAndroid Build Coastguard Worker * ring_idx. Queues created without a ring_idx binding are associated to a 62*bbecb9d1SAndroid Build Coastguard Worker * shared legacy timeline. The special ring_idx==0 is reserved for CPU 63*bbecb9d1SAndroid Build Coastguard Worker * fences that are signaled by the renderer immediately upon consumption of 64*bbecb9d1SAndroid Build Coastguard Worker * the associated renderer submission. 65*bbecb9d1SAndroid Build Coastguard Worker */ 66*bbecb9d1SAndroid Build Coastguard Worker uint32_t supports_multiple_timelines; 67*bbecb9d1SAndroid Build Coastguard Worker }; 68*bbecb9d1SAndroid Build Coastguard Worker #endif 69*bbecb9d1SAndroid Build Coastguard Worker 70*bbecb9d1SAndroid Build Coastguard Worker #endif /* VENUS_HW_H */ 71