projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f8155ef
)
st/xorg: fix xv
author
Zack Rusin
<zackr@vmware.com>
Sun, 25 Oct 2009 16:19:38 +0000
(12:19 -0400)
committer
Zack Rusin
<zackr@vmware.com>
Wed, 28 Oct 2009 01:00:47 +0000
(21:00 -0400)
src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
patch
|
blob
|
history
src/gallium/state_trackers/xorg/xorg_renderer.c
patch
|
blob
|
history
src/gallium/state_trackers/xorg/xorg_xv.c
patch
|
blob
|
history
diff --git
a/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
b/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
index 30fcff8a4948c6abf9c6e0bc59e05d5eb675af6d..83cc12fea9aec62327cdadcda6ba857a266d411b 100644
(file)
--- a/
src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
+++ b/
src/gallium/state_trackers/xorg/xorg_exa_tgsi.c
@@
-259,14
+259,6
@@
create_vs(struct pipe_context *pipe,
src = ureg_DECL_vs_input(ureg, input_slot++);
dst = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 0);
ureg_MOV(ureg, dst, src);
src = ureg_DECL_vs_input(ureg, input_slot++);
dst = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 0);
ureg_MOV(ureg, dst, src);
-
- src = ureg_DECL_vs_input(ureg, input_slot++);
- dst = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 1);
- ureg_MOV(ureg, dst, src);
-
- src = ureg_DECL_vs_input(ureg, input_slot++);
- dst = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 2);
- ureg_MOV(ureg, dst, src);
}
if (is_composite) {
}
if (is_composite) {
@@
-328,6
+320,11
@@
create_yuv_shader(struct pipe_context *pipe, struct ureg_program *ureg)
ureg_TEX(ureg, v,
TGSI_TEXTURE_2D, pos, v_sampler);
ureg_TEX(ureg, v,
TGSI_TEXTURE_2D, pos, v_sampler);
+ ureg_SUB(ureg, u, ureg_src(u),
+ ureg_scalar(matrow0, TGSI_SWIZZLE_W));
+ ureg_SUB(ureg, v, ureg_src(v),
+ ureg_scalar(matrow0, TGSI_SWIZZLE_W));
+
ureg_MUL(ureg, rgb,
ureg_scalar(ureg_src(y), TGSI_SWIZZLE_X),
matrow0);
ureg_MUL(ureg, rgb,
ureg_scalar(ureg_src(y), TGSI_SWIZZLE_X),
matrow0);
diff --git
a/src/gallium/state_trackers/xorg/xorg_renderer.c
b/src/gallium/state_trackers/xorg/xorg_renderer.c
index ec5268f9d6c39734883602e6eb0dea54828905e2..a740e862b758245486cdd292e195cafc5c6d3ce8 100644
(file)
--- a/
src/gallium/state_trackers/xorg/xorg_renderer.c
+++ b/
src/gallium/state_trackers/xorg/xorg_renderer.c
@@
-869,6
+869,7
@@
void renderer_draw_textures(struct xorg_renderer *r,
pos[2], pos[3],
width, height,
textures);
pos[2], pos[3],
width, height,
textures);
+ num_textures = 1;
break;
default:
debug_assert(!"Unsupported number of textures");
break;
default:
debug_assert(!"Unsupported number of textures");
diff --git
a/src/gallium/state_trackers/xorg/xorg_xv.c
b/src/gallium/state_trackers/xorg/xorg_xv.c
index f4b0d564d666be2e6eb476ae9fd55642f4c42092..2a3a42bdeaf760f657c89b67dde53119125651e3 100644
(file)
--- a/
src/gallium/state_trackers/xorg/xorg_xv.c
+++ b/
src/gallium/state_trackers/xorg/xorg_xv.c
@@
-22,17
+22,31
@@
/* The ITU-R BT.601 conversion matrix for SDTV. */
/* The ITU-R BT.601 conversion matrix for SDTV. */
+/* original, matrix, but we transpose it to
+ * make the shader easier
static const float bt_601[] = {
static const float bt_601[] = {
- 1.0, 0.0, 1.4075,
0
,
+ 1.0, 0.0, 1.4075, ,
1.0, -0.3455, -0.7169, 0,
1.0, 1.7790, 0., 0,
1.0, -0.3455, -0.7169, 0,
1.0, 1.7790, 0., 0,
+};*/
+static const float bt_601[] = {
+ 1.0, 1.0, 1.0, 0.5,
+ 0.0, -0.3455, 1.7790, 0,
+ 1.4075, -0.7169, 0., 0,
};
/* The ITU-R BT.709 conversion matrix for HDTV. */
};
/* The ITU-R BT.709 conversion matrix for HDTV. */
+/* original, but we transpose to make the conversion
+ * in the shader easier
static const float bt_709[] = {
1.0, 0.0, 1.581, 0,
1.0, -0.1881, -0.47, 0,
1.0, 1.8629, 0., 0,
static const float bt_709[] = {
1.0, 0.0, 1.581, 0,
1.0, -0.1881, -0.47, 0,
1.0, 1.8629, 0., 0,
+};*/
+static const float bt_709[] = {
+ 1.0, 1.0, 1.0, 0.5,
+ 0.0, -0.1881, 1.8629, 0,
+ 1.581,-0.47 , 0.0, 0,
};
#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
};
#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)