mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-12-02 21:00:00 +00:00
pan/bi: Add bi_dual_tex_as_u32 helper
Type safe cast, making dual texture descriptors easier to manipulate. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13723>
This commit is contained in:
parent
9b2a383af8
commit
ce8d2b96c1
@ -28,6 +28,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -572,6 +573,15 @@ struct bifrost_dual_texture_operation {
|
||||
unsigned primary_mask : 4;
|
||||
} __attribute__((packed));
|
||||
|
||||
static inline uint32_t
|
||||
bi_dual_tex_as_u32(struct bifrost_dual_texture_operation desc)
|
||||
{
|
||||
uint32_t desc_u;
|
||||
memcpy(&desc_u, &desc, sizeof(desc));
|
||||
|
||||
return desc_u;
|
||||
}
|
||||
|
||||
#define BIFROST_MEGA_SAMPLE 128
|
||||
#define BIFROST_ALL_SAMPLES 255
|
||||
#define BIFROST_CURRENT_PIXEL 255
|
||||
|
Loading…
Reference in New Issue
Block a user