#define NV50_BLIT_TEXTURE_2D_ARRAY 5
#define NV50_BLIT_MAX_TEXTURE_TYPES 6
-static INLINE unsigned
+static inline unsigned
nv50_blit_texture_type(enum pipe_texture_target target)
{
switch (target) {
}
}
-static INLINE unsigned
+static inline unsigned
nv50_blit_get_tgsi_texture_target(enum pipe_texture_target target)
{
switch (target) {
}
}
-static INLINE enum pipe_texture_target
+static inline enum pipe_texture_target
nv50_blit_reinterpret_pipe_texture_target(enum pipe_texture_target target)
{
switch (target) {
}
}
-static INLINE unsigned
+static inline unsigned
nv50_blit_get_filter(const struct pipe_blit_info *info)
{
if (info->dst.resource->nr_samples < info->src.resource->nr_samples)
/* Since shaders cannot export stencil, we cannot copy stencil values when
* rendering to ZETA, so we attach the ZS surface to a colour render target.
*/
-static INLINE enum pipe_format
+static inline enum pipe_format
nv50_blit_zeta_to_colour_format(enum pipe_format format)
{
switch (format) {
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
case PIPE_FORMAT_S8_UINT_Z24_UNORM:
case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_X24S8_UINT:
+ case PIPE_FORMAT_S8X24_UINT:
return PIPE_FORMAT_R8G8B8A8_UNORM;
case PIPE_FORMAT_Z32_FLOAT:
return PIPE_FORMAT_R32_FLOAT;
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
+ case PIPE_FORMAT_X32_S8X24_UINT:
return PIPE_FORMAT_R32G32_FLOAT;
default:
assert(0);
}
-static INLINE uint16_t
+static inline uint16_t
nv50_blit_derive_color_mask(const struct pipe_blit_info *info)
{
const unsigned mask = info->mask;
uint16_t color_mask = 0;
switch (info->dst.format) {
+ case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_X24S8_UINT:
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
if (mask & PIPE_MASK_S)
color_mask |= 0x1000;
- /* fall through */
- case PIPE_FORMAT_Z24X8_UNORM:
if (mask & PIPE_MASK_Z)
color_mask |= 0x0111;
break;
+ case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_S8X24_UINT:
case PIPE_FORMAT_S8_UINT_Z24_UNORM:
- if (mask & PIPE_MASK_Z)
- color_mask |= 0x1110;
if (mask & PIPE_MASK_S)
color_mask |= 0x0001;
+ if (mask & PIPE_MASK_Z)
+ color_mask |= 0x1110;
break;
default:
if (mask & (PIPE_MASK_R | PIPE_MASK_Z)) color_mask |= 0x0001;
return color_mask;
}
-static INLINE uint32_t
+static inline uint32_t
nv50_blit_eng2d_get_mask(const struct pipe_blit_info *info)
{
uint32_t mask = 0;
switch (info->dst.format) {
+ case PIPE_FORMAT_Z24X8_UNORM:
+ case PIPE_FORMAT_X24S8_UINT:
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
if (info->mask & PIPE_MASK_Z) mask |= 0x00ffffff;
if (info->mask & PIPE_MASK_S) mask |= 0xff000000;
break;
+ case PIPE_FORMAT_X8Z24_UNORM:
+ case PIPE_FORMAT_S8X24_UINT:
case PIPE_FORMAT_S8_UINT_Z24_UNORM:
if (info->mask & PIPE_MASK_Z) mask |= 0xffffff00;
if (info->mask & PIPE_MASK_S) mask |= 0x000000ff;
break;
- case PIPE_FORMAT_X8Z24_UNORM:
- if (info->mask & PIPE_MASK_Z) mask = 0x00ffffff;
- break;
default:
mask = 0xffffffff;
break;
# define nv50_format_table nvc0_format_table
#endif
-/* return TRUE for formats that can be converted among each other by NVC0_2D */
-static INLINE boolean
+/* return true for formats that can be converted among each other by NVC0_2D */
+static inline bool
nv50_2d_dst_format_faithful(enum pipe_format format)
{
const uint64_t mask =
uint8_t id = nv50_format_table[format].rt;
return (id >= 0xc0) && (mask & (1ULL << (id - 0xc0)));
}
-static INLINE boolean
+static inline bool
nv50_2d_src_format_faithful(enum pipe_format format)
{
const uint64_t mask =
return (id >= 0xc0) && (mask & (1ULL << (id - 0xc0)));
}
-static INLINE boolean
+static inline bool
nv50_2d_format_supported(enum pipe_format format)
{
uint8_t id = nv50_format_table[format].rt;
(NV50_ENG2D_SUPPORTED_FORMATS & (1ULL << (id - 0xc0)));
}
-static INLINE boolean
+static inline bool
nv50_2d_dst_format_ops_supported(enum pipe_format format)
{
uint8_t id = nv50_format_table[format].rt;