示例#1
0
static boolean
nv30_screen_is_format_supported(struct pipe_screen *pscreen,
                                enum pipe_format format,
                                enum pipe_texture_target target,
                                unsigned sample_count,
                                unsigned bindings)
{
   if (sample_count > nv30_screen(pscreen)->max_sample_count)
      return false;

   if (!(0x00000017 & (1 << sample_count)))
      return false;

   if (!util_format_is_supported(format, bindings)) {
      return false;
   }

   /* shared is always supported */
   bindings &= ~PIPE_BIND_SHARED;

   return (nv30_format_info(pscreen, format)->bindings & bindings) == bindings;
}
示例#2
0
static boolean
nv30_screen_is_format_supported(struct pipe_screen *pscreen,
                                enum pipe_format format,
                                enum pipe_texture_target target,
                                unsigned sample_count,
                                unsigned bindings)
{
   if (sample_count > 4)
      return FALSE;
   if (!(0x00000017 & (1 << sample_count)))
      return FALSE;

   if (!util_format_is_supported(format, bindings)) {
      return FALSE;
   }

   /* transfers & shared are always supported */
   bindings &= ~(PIPE_BIND_TRANSFER_READ |
                 PIPE_BIND_TRANSFER_WRITE |
                 PIPE_BIND_SHARED);

   return (nv30_format_info(pscreen, format)->bindings & bindings) == bindings;
}