summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-07-12 00:12:12 +0200
committerChristian König <[email protected]>2011-07-12 00:12:12 +0200
commitefc7fda4627919b5355952d955ee4a2c98505e56 (patch)
tree4398a353d70746f9d04016316bf6b6e30ebf8171 /src/gallium/drivers
parentdf5e0b9435c869f88234a69db9bfe97342b027d4 (diff)
[g3dvl] add some more PIPE_VIDEO_CAPs
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nvfx/nvfx_screen.c6
-rw-r--r--src/gallium/drivers/r300/r300_screen.c18
-rw-r--r--src/gallium/drivers/r600/r600_pipe.c5
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c6
4 files changed, 29 insertions, 6 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_screen.c b/src/gallium/drivers/nvfx/nvfx_screen.c
index 4901e3b2bf7..d85c0a6da41 100644
--- a/src/gallium/drivers/nvfx/nvfx_screen.c
+++ b/src/gallium/drivers/nvfx/nvfx_screen.c
@@ -3,6 +3,7 @@
#include "util/u_format.h"
#include "util/u_format_s3tc.h"
#include "util/u_simple_screen.h"
+#include "vl/vl_decoder.h"
#include "vl/vl_video_buffer.h"
#include "nouveau/nouveau_screen.h"
@@ -213,8 +214,13 @@ nvfx_screen_get_video_param(struct pipe_screen *screen,
enum pipe_video_cap param)
{
switch (param) {
+ case PIPE_VIDEO_CAP_SUPPORTED:
+ return vl_profile_supported(screen, profile);
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
return 0;
+ case PIPE_VIDEO_CAP_MAX_WIDTH:
+ case PIPE_VIDEO_CAP_MAX_HEIGHT:
+ return vl_video_buffer_max_size(screen);
default:
return 0;
}
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 19b273f4f49..c8df45fb3e7 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -25,6 +25,7 @@
#include "util/u_format_s3tc.h"
#include "util/u_memory.h"
#include "os/os_time.h"
+#include "vl/vl_decoder.h"
#include "vl/vl_video_buffer.h"
#include "r300_context.h"
@@ -307,12 +308,17 @@ static int r300_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 0;
- default:
- return 0;
- }
+ switch (param) {
+ case PIPE_VIDEO_CAP_SUPPORTED:
+ return vl_profile_supported(screen, profile);
+ case PIPE_VIDEO_CAP_NPOT_TEXTURES:
+ return 0;
+ case PIPE_VIDEO_CAP_MAX_WIDTH:
+ case PIPE_VIDEO_CAP_MAX_HEIGHT:
+ return vl_video_buffer_max_size(screen);
+ default:
+ return 0;
+ }
}
static boolean r300_is_format_supported(struct pipe_screen* screen,
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 8e492787235..65b12de79b1 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -491,8 +491,13 @@ static int r600_get_video_param(struct pipe_screen *screen,
enum pipe_video_cap param)
{
switch (param) {
+ case PIPE_VIDEO_CAP_SUPPORTED:
+ return vl_profile_supported(screen, profile);
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
return 1;
+ case PIPE_VIDEO_CAP_MAX_WIDTH:
+ case PIPE_VIDEO_CAP_MAX_HEIGHT:
+ return vl_video_buffer_max_size(screen);
default:
return 0;
}
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index f952e6046f0..1e58d27be88 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -33,6 +33,7 @@
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
#include "draw/draw_context.h"
+#include "vl/vl_decoder.h"
#include "vl/vl_video_buffer.h"
#include "state_tracker/sw_winsys.h"
@@ -177,8 +178,13 @@ softpipe_get_video_param(struct pipe_screen *screen,
enum pipe_video_cap param)
{
switch (param) {
+ case PIPE_VIDEO_CAP_SUPPORTED:
+ return vl_profile_supported(screen, profile);
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
return 0;
+ case PIPE_VIDEO_CAP_MAX_WIDTH:
+ case PIPE_VIDEO_CAP_MAX_HEIGHT:
+ return vl_video_buffer_max_size(screen);
default:
return 0;
}