"Fossies" - the Fresh Open Source Software Archive

Member "mesa-20.1.8/src/gallium/drivers/zink/zink_screen.h" (16 Sep 2020, 2201 Bytes) of package /linux/misc/mesa-20.1.8.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "zink_screen.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 20.1.5_vs_20.2.0-rc1.

    1 /*
    2  * Copyright 2018 Collabora Ltd.
    3  *
    4  * Permission is hereby granted, free of charge, to any person obtaining a
    5  * copy of this software and associated documentation files (the "Software"),
    6  * to deal in the Software without restriction, including without limitation
    7  * on the rights to use, copy, modify, merge, publish, distribute, sub
    8  * license, and/or sell copies of the Software, and to permit persons to whom
    9  * the Software is furnished to do so, subject to the following conditions:
   10  *
   11  * The above copyright notice and this permission notice (including the next
   12  * paragraph) shall be included in all copies or substantial portions of the
   13  * Software.
   14  *
   15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   17  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
   18  * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
   19  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
   20  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
   21  * USE OR OTHER DEALINGS IN THE SOFTWARE.
   22  */
   23 
   24 #ifndef ZINK_SCREEN_H
   25 #define ZINK_SCREEN_H
   26 
   27 #include "pipe/p_screen.h"
   28 #include "util/slab.h"
   29 
   30 #include <vulkan/vulkan.h>
   31 
   32 extern uint32_t zink_debug;
   33 
   34 #define ZINK_DEBUG_NIR 0x1
   35 #define ZINK_DEBUG_SPIRV 0x2
   36 #define ZINK_DEBUG_TGSI 0x4
   37 
   38 struct zink_screen {
   39    struct pipe_screen base;
   40 
   41    struct sw_winsys *winsys;
   42 
   43    struct slab_parent_pool transfer_pool;
   44 
   45    VkInstance instance;
   46    VkPhysicalDevice pdev;
   47 
   48    VkPhysicalDeviceProperties props;
   49    VkPhysicalDeviceFeatures feats;
   50    VkPhysicalDeviceMemoryProperties mem_props;
   51 
   52    bool have_KHR_maintenance1;
   53    bool have_KHR_external_memory_fd;
   54 
   55    bool have_X8_D24_UNORM_PACK32;
   56    bool have_D24_UNORM_S8_UINT;
   57 
   58    uint32_t gfx_queue;
   59    VkDevice dev;
   60 
   61    PFN_vkGetMemoryFdKHR vk_GetMemoryFdKHR;
   62 };
   63 
   64 static inline struct zink_screen *
   65 zink_screen(struct pipe_screen *pipe)
   66 {
   67    return (struct zink_screen *)pipe;
   68 }
   69 
   70 VkFormat
   71 zink_get_format(struct zink_screen *screen, enum pipe_format format);
   72 
   73 bool
   74 zink_is_depth_format_supported(struct zink_screen *screen, VkFormat format);
   75 
   76 #endif