[g3dvl] remove PIPE_CAP_DECODE_TARGET_PREFERRED_FORMAT
authorChristian König <deathsimple@vodafone.de>
Sat, 2 Apr 2011 17:50:37 +0000 (19:50 +0200)
committerChristian König <deathsimple@vodafone.de>
Sat, 2 Apr 2011 17:50:37 +0000 (19:50 +0200)
It wasn't fully implemented anyway.

src/gallium/auxiliary/vl/vl_mpeg12_context.c
src/gallium/auxiliary/vl/vl_mpeg12_context.h
src/gallium/drivers/nv40/nv40_video_context.c
src/gallium/drivers/nvfx/nvfx_video_context.c
src/gallium/drivers/r600/r600_video_context.c
src/gallium/drivers/softpipe/sp_screen.c
src/gallium/include/pipe/p_video_context.h

index 9f3da7381bac04f14a03080d70e9918003ffbfd8..8ea6fd0844903eaec10792d086878b4fc1c4405e 100644 (file)
@@ -256,17 +256,11 @@ vl_mpeg12_get_param(struct pipe_video_context *vpipe, int param)
 
    assert(vpipe);
 
-   switch (param) {
-      case PIPE_CAP_NPOT_TEXTURES:
-         return !ctx->pot_buffers;
-      case PIPE_CAP_DECODE_TARGET_PREFERRED_FORMAT:
-         return ctx->decode_format;
-      default:
-      {
-         debug_printf("vl_mpeg12_context: Unknown PIPE_CAP %d\n", param);
-         return 0;
-      }
-   }
+   if (param == PIPE_CAP_NPOT_TEXTURES)
+      return !ctx->pot_buffers;
+
+   debug_printf("vl_mpeg12_context: Unknown PIPE_CAP %d\n", param);
+   return 0;
 }
 
 static struct pipe_surface *
@@ -654,8 +648,7 @@ vl_create_mpeg12_context(struct pipe_context *pipe,
                          enum pipe_video_profile profile,
                          enum pipe_video_chroma_format chroma_format,
                          unsigned width, unsigned height,
-                         bool pot_buffers,
-                         enum pipe_format decode_format)
+                         bool pot_buffers)
 {
    struct vl_mpeg12_context *ctx;
 
@@ -686,7 +679,6 @@ vl_create_mpeg12_context(struct pipe_context *pipe,
    ctx->base.set_csc_matrix = vl_mpeg12_set_csc_matrix;
 
    ctx->pipe = pipe;
-   ctx->decode_format = decode_format;
    ctx->pot_buffers = pot_buffers;
 
    ctx->quads = vl_vb_upload_quads(ctx->pipe, 2, 2);
index e0c6ca94c455bf8aca145f192394b63aa7a8c30b..3cc052941b26c6c3fc36c2c4e09a06203bdb2d9c 100644 (file)
@@ -41,7 +41,6 @@ struct vl_mpeg12_context
 {
    struct pipe_video_context base;
    struct pipe_context *pipe;
-   enum pipe_format decode_format;
    bool pot_buffers;
    unsigned buffer_width, buffer_height;
 
@@ -89,7 +88,6 @@ vl_create_mpeg12_context(struct pipe_context *pipe,
                          enum pipe_video_profile profile,
                          enum pipe_video_chroma_format chroma_format,
                          unsigned width, unsigned height,
-                         bool pot_buffers,
-                         enum pipe_format decode_format);
+                         bool pot_buffers);
 
 #endif /* VL_MPEG12_CONTEXT_H */
index 35395e848fc21f10a1bce98d57095e3351324082..34bb7cdbddaac150adf59054f39bb62a46ec99c3 100644 (file)
@@ -47,8 +47,7 @@ nv40_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
          return vl_create_mpeg12_context(pipe, profile,
                                          chroma_format,
                                          width, height,
-                                         true,
-                                         PIPE_FORMAT_XYUV);
+                                         true);
       default:
          return NULL;
    }
index 0456926c9ad90dfec7a65442daa2f4a47cff6928..01a84f2ebc6acd96370c903c80492e059f208f87 100644 (file)
@@ -47,8 +47,7 @@ nvfx_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
          return vl_create_mpeg12_context(pipe, profile,
                                          chroma_format,
                                          width, height,
-                                         true,
-                                         PIPE_FORMAT_XYUV);
+                                         true);
       default:
          return NULL;
    }
index 8190c9ae612740e878621c8fa498fe247d6f5eb8..c1b0c0982454e9f74e2891af70541fb5fabb375b 100644 (file)
@@ -47,8 +47,7 @@ r600_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
          return vl_create_mpeg12_context(pipe, profile,
                                          chroma_format,
                                          width, height,
-                                         false,
-                                         PIPE_FORMAT_XYUV);
+                                         false);
       default:
          return NULL;
    }
index 26f5e1b57405ad76ef71444a6c22ca901778d30a..d5936641ba544405c5ea073226ae181c76b074f2 100644 (file)
@@ -307,8 +307,7 @@ sp_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
          return vl_create_mpeg12_context(pipe, profile,
                                          chroma_format,
                                          width, height,
-                                         true,
-                                         PIPE_FORMAT_XYUV);
+                                         true);
       default:
          return NULL;
    }
index 09e2d2702c7fbf349d557a1e54ed8e608bfc0cb6..7786f0a6f6f276b91973b7a76bf10fee1dd818a0 100644 (file)
@@ -34,9 +34,6 @@ extern "C" {
 
 #include <pipe/p_video_state.h>
 
-/* XXX: Move to an appropriate place */
-#define PIPE_CAP_DECODE_TARGET_PREFERRED_FORMAT 256
-
 struct pipe_screen;
 struct pipe_buffer;
 struct pipe_surface;