Merge remote-tracking branch 'origin/master' into pipe-video
authorChristian König <deathsimple@vodafone.de>
Mon, 11 Jul 2011 08:48:59 +0000 (10:48 +0200)
committerChristian König <deathsimple@vodafone.de>
Mon, 11 Jul 2011 08:48:59 +0000 (10:48 +0200)
Conflicts:
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_state_inlines.h

1  2 
configure.ac
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_state.c
src/gallium/drivers/r600/r600_texture.c
src/gallium/winsys/r600/drm/r600_hw_context.c

diff --cc configure.ac
Simple merge
index 76bb1883ede6ce1d68320e8ec9dc5da4bc5198eb,a3df4f571a0d9a2ebe46de8006ebef60b28fffb0..8e492787235caf9170e771dc7a727957e9c37ea6
@@@ -227,22 -224,9 +226,12 @@@ static struct pipe_context *r600_create
        r600_init_surface_functions(rctx);
        rctx->context.draw_vbo = r600_draw_vbo;
  
-       switch (r600_get_family(rctx->radeon)) {
-       case CHIP_R600:
-       case CHIP_RV610:
-       case CHIP_RV630:
-       case CHIP_RV670:
-       case CHIP_RV620:
-       case CHIP_RV635:
-       case CHIP_RS780:
-       case CHIP_RS880:
-       case CHIP_RV770:
-       case CHIP_RV730:
-       case CHIP_RV710:
-       case CHIP_RV740:
 +      rctx->context.create_video_decoder = vl_create_decoder;
 +      rctx->context.create_video_buffer = vl_video_buffer_create;
 +
+       switch (rctx->chip_class) {
+       case R600:
+       case R700:
                r600_init_state_functions(rctx);
                if (r600_context_init(&rctx->ctx, rctx->radeon)) {
                        r600_destroy_context(&rctx->context);
@@@ -511,76 -481,6 +486,18 @@@ static int r600_get_shader_param(struc
        }
  }
  
- static boolean r600_is_format_supported(struct pipe_screen* screen,
-                                       enum pipe_format format,
-                                       enum pipe_texture_target target,
-                                       unsigned sample_count,
-                                         unsigned usage)
- {
-       unsigned retval = 0;
-       if (target >= PIPE_MAX_TEXTURE_TYPES) {
-               R600_ERR("r600: unsupported texture type %d\n", target);
-               return FALSE;
-       }
-         if (!util_format_is_supported(format, usage))
-                 return FALSE;
-       /* Multisample */
-       if (sample_count > 1)
-               return FALSE;
-       if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
-           r600_is_sampler_format_supported(screen, format)) {
-               retval |= PIPE_BIND_SAMPLER_VIEW;
-       }
-       if ((usage & (PIPE_BIND_RENDER_TARGET |
-                       PIPE_BIND_DISPLAY_TARGET |
-                       PIPE_BIND_SCANOUT |
-                       PIPE_BIND_SHARED)) &&
-                       r600_is_colorbuffer_format_supported(format)) {
-               retval |= usage &
-                       (PIPE_BIND_RENDER_TARGET |
-                        PIPE_BIND_DISPLAY_TARGET |
-                        PIPE_BIND_SCANOUT |
-                        PIPE_BIND_SHARED);
-       }
-       if ((usage & PIPE_BIND_DEPTH_STENCIL) &&
-           r600_is_zs_format_supported(format)) {
-               retval |= PIPE_BIND_DEPTH_STENCIL;
-       }
-       if (usage & PIPE_BIND_VERTEX_BUFFER) {
-               struct r600_screen *rscreen = (struct r600_screen *)screen;
-               enum radeon_family family = r600_get_family(rscreen->radeon);
-               if (r600_is_vertex_format_supported(format, family)) {
-                       retval |= PIPE_BIND_VERTEX_BUFFER;
-               }
-       }
-       if (usage & PIPE_BIND_TRANSFER_READ)
-               retval |= PIPE_BIND_TRANSFER_READ;
-       if (usage & PIPE_BIND_TRANSFER_WRITE)
-               retval |= PIPE_BIND_TRANSFER_WRITE;
-       return retval == usage;
- }
 +static int r600_get_video_param(struct pipe_screen *screen,
 +                              enum pipe_video_profile profile,
 +                              enum pipe_video_cap param)
 +{
 +      switch (param) {
 +      case PIPE_VIDEO_CAP_NPOT_TEXTURES:
 +              return 1;
 +      default:
 +              return 0;
 +      }
 +}
 +
  static void r600_destroy_screen(struct pipe_screen* pscreen)
  {
        struct r600_screen *rscreen = (struct r600_screen *)pscreen;
@@@ -669,9 -569,11 +586,13 @@@ struct pipe_screen *r600_screen_create(
        rscreen->screen.get_param = r600_get_param;
        rscreen->screen.get_shader_param = r600_get_shader_param;
        rscreen->screen.get_paramf = r600_get_paramf;
-       rscreen->screen.is_format_supported = r600_is_format_supported;
 +      rscreen->screen.get_video_param = r600_get_video_param;
+       if (r600_get_family_class(radeon) >= EVERGREEN) {
+               rscreen->screen.is_format_supported = evergreen_is_format_supported;
+       } else {
+               rscreen->screen.is_format_supported = r600_is_format_supported;
+       }
 +      rscreen->screen.is_video_format_supported = vl_video_buffer_is_format_supported;
        rscreen->screen.context_create = r600_create_context;
        rscreen->screen.fence_reference = r600_fence_reference;
        rscreen->screen.fence_signalled = r600_fence_signalled;
Simple merge