Monado OpenXR Runtime
u_format.c File Reference

Format helpers and block code. More...

#include "util/u_format.h"
#include <assert.h>
Include dependency graph for u_format.c:

Functions

const char * u_format_str (enum xrt_format f)
 Return string for this format. More...
 
bool u_format_is_blocks (enum xrt_format f)
 Is this format block based, also returns true for formats that 1x1 blocks. More...
 
uint32_t u_format_block_width (enum xrt_format f)
 Returns the width of the block for the given format. More...
 
uint32_t u_format_block_height (enum xrt_format f)
 Returns the height of the block for the given format. More...
 
size_t u_format_block_size (enum xrt_format f)
 Returns the size of the block for the given format. More...
 
void u_format_size_for_dimensions (enum xrt_format f, uint32_t width, uint32_t height, size_t *out_stride, size_t *out_size)
 Calculate stride and size for the format and given width and height. More...
 

Detailed Description

Format helpers and block code.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m