Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/panfrost/lib/pan_util.h
4560 views
1
/**************************************************************************
2
*
3
* Copyright 2019 Collabora, Ltd.
4
* All Rights Reserved.
5
*
6
* Permission is hereby granted, free of charge, to any person obtaining a
7
* copy of this software and associated documentation files (the
8
* "Software"), to deal in the Software without restriction, including
9
* without limitation the rights to use, copy, modify, merge, publish,
10
* distribute, sub license, and/or sell copies of the Software, and to
11
* permit persons to whom the Software is furnished to do so, subject to
12
* the following conditions:
13
*
14
* The above copyright notice and this permission notice (including the
15
* next paragraph) shall be included in all copies or substantial portions
16
* of the Software.
17
*
18
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21
* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
22
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
*
26
**************************************************************************/
27
28
#ifndef PAN_UTIL_H
29
#define PAN_UTIL_H
30
31
#include <stdint.h>
32
#include <stdbool.h>
33
#include "util/format/u_format.h"
34
35
#define PAN_DBG_PERF 0x0001
36
#define PAN_DBG_TRACE 0x0002
37
#define PAN_DBG_DEQP 0x0004
38
#define PAN_DBG_DIRTY 0x0008
39
#define PAN_DBG_SYNC 0x0010
40
#define PAN_DBG_PRECOMPILE 0x0020
41
#define PAN_DBG_NOFP16 0x0040
42
#define PAN_DBG_NO_CRC 0x0080
43
#define PAN_DBG_GL3 0x0100
44
#define PAN_DBG_NO_AFBC 0x0200
45
#define PAN_DBG_MSAA16 0x0400
46
#define PAN_DBG_NOINDIRECT 0x0800
47
48
struct panfrost_device;
49
50
unsigned
51
panfrost_translate_swizzle_4(const unsigned char swizzle[4]);
52
53
void
54
panfrost_invert_swizzle(const unsigned char *in, unsigned char *out);
55
56
unsigned
57
panfrost_format_to_bifrost_blend(const struct panfrost_device *dev,
58
enum pipe_format format);
59
60
void
61
pan_pack_color(uint32_t *packed, const union pipe_color_union *color, enum pipe_format format);
62
63
#endif /* PAN_UTIL_H */
64
65