projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '7.8'
[mesa.git]
/
src
/
gallium
/
state_trackers
/
xorg
/
xorg_xv.c
diff --git
a/src/gallium/state_trackers/xorg/xorg_xv.c
b/src/gallium/state_trackers/xorg/xorg_xv.c
index 5efda6837dea5dcf7a67e250011b9306fe15d7c6..a221594454e79baabf0358618fa897558d27c3a1 100644
(file)
--- a/
src/gallium/state_trackers/xorg/xorg_xv.c
+++ b/
src/gallium/state_trackers/xorg/xorg_xv.c
@@
-91,7
+91,7
@@
struct xorg_xv_port_priv {
int current_set;
/* juggle two sets of seperate Y, U and V
* textures */
int current_set;
/* juggle two sets of seperate Y, U and V
* textures */
- struct pipe_
textur
e *yuv[2][3];
+ struct pipe_
resourc
e *yuv[2][3];
struct pipe_sampler_view *yuv_views[2][3];
};
struct pipe_sampler_view *yuv_views[2][3];
};
@@
-156,13
+156,13
@@
query_best_size(ScrnInfoPtr pScrn,
*p_h = drw_h;
}
*p_h = drw_h;
}
-static INLINE struct pipe_
textur
e *
+static INLINE struct pipe_
resourc
e *
create_component_texture(struct pipe_context *pipe,
int width, int height)
{
struct pipe_screen *screen = pipe->screen;
create_component_texture(struct pipe_context *pipe,
int width, int height)
{
struct pipe_screen *screen = pipe->screen;
- struct pipe_
textur
e *tex = 0;
- struct pipe_
textur
e templ;
+ struct pipe_
resourc
e *tex = 0;
+ struct pipe_
resourc
e templ;
memset(&templ, 0, sizeof(templ));
templ.target = PIPE_TEXTURE_2D;
memset(&templ, 0, sizeof(templ));
templ.target = PIPE_TEXTURE_2D;
@@
-171,9
+171,9
@@
create_component_texture(struct pipe_context *pipe,
templ.width0 = width;
templ.height0 = height;
templ.depth0 = 1;
templ.width0 = width;
templ.height0 = height;
templ.depth0 = 1;
- templ.
tex_usage = PIPE_TEXTURE_USAGE_SAMPLER
;
+ templ.
bind = PIPE_BIND_SAMPLER_VIEW
;
- tex = screen->
textur
e_create(screen, &templ);
+ tex = screen->
resourc
e_create(screen, &templ);
return tex;
}
return tex;
}
@@
-181,7
+181,7
@@
create_component_texture(struct pipe_context *pipe,
static int
check_yuv_textures(struct xorg_xv_port_priv *priv, int width, int height)
{
static int
check_yuv_textures(struct xorg_xv_port_priv *priv, int width, int height)
{
- struct pipe_
textur
e **dst = priv->yuv[priv->current_set];
+ struct pipe_
resourc
e **dst = priv->yuv[priv->current_set];
struct pipe_sampler_view **dst_view = priv->yuv_views[priv->current_set];
struct pipe_sampler_view view_templ;
struct pipe_context *pipe = priv->r->pipe;
struct pipe_sampler_view **dst_view = priv->yuv_views[priv->current_set];
struct pipe_sampler_view view_templ;
struct pipe_context *pipe = priv->r->pipe;
@@
-189,19
+189,19
@@
check_yuv_textures(struct xorg_xv_port_priv *priv, int width, int height)
if (!dst[0] ||
dst[0]->width0 != width ||
dst[0]->height0 != height) {
if (!dst[0] ||
dst[0]->width0 != width ||
dst[0]->height0 != height) {
- pipe_
textur
e_reference(&dst[0], NULL);
+ pipe_
resourc
e_reference(&dst[0], NULL);
pipe_sampler_view_reference(&dst_view[0], NULL);
}
if (!dst[1] ||
dst[1]->width0 != width ||
dst[1]->height0 != height) {
pipe_sampler_view_reference(&dst_view[0], NULL);
}
if (!dst[1] ||
dst[1]->width0 != width ||
dst[1]->height0 != height) {
- pipe_
textur
e_reference(&dst[1], NULL);
+ pipe_
resourc
e_reference(&dst[1], NULL);
pipe_sampler_view_reference(&dst_view[1], NULL);
}
if (!dst[2] ||
dst[2]->width0 != width ||
dst[2]->height0 != height) {
pipe_sampler_view_reference(&dst_view[1], NULL);
}
if (!dst[2] ||
dst[2]->width0 != width ||
dst[2]->height0 != height) {
- pipe_
textur
e_reference(&dst[2], NULL);
+ pipe_
resourc
e_reference(&dst[2], NULL);
pipe_sampler_view_reference(&dst_view[2], NULL);
}
pipe_sampler_view_reference(&dst_view[2], NULL);
}
@@
-303,7
+303,7
@@
copy_packed_data(ScrnInfoPtr pScrn,
unsigned short w, unsigned short h)
{
int i, j;
unsigned short w, unsigned short h)
{
int i, j;
- struct pipe_
textur
e **dst = port->yuv[port->current_set];
+ struct pipe_
resourc
e **dst = port->yuv[port->current_set];
struct pipe_transfer *ytrans, *utrans, *vtrans;
struct pipe_context *pipe = port->r->pipe;
char *ymap, *vmap, *umap;
struct pipe_transfer *ytrans, *utrans, *vtrans;
struct pipe_context *pipe = port->r->pipe;
char *ymap, *vmap, *umap;
@@
-311,15
+311,15
@@
copy_packed_data(ScrnInfoPtr pScrn,
int yidx, uidx, vidx;
int y_array_size = w * h;
int yidx, uidx, vidx;
int y_array_size = w * h;
- ytrans = pipe
->get_tex
_transfer(pipe, dst[0],
+ ytrans = pipe
_get
_transfer(pipe, dst[0],
0, 0, 0,
PIPE_TRANSFER_WRITE,
left, top, w, h);
0, 0, 0,
PIPE_TRANSFER_WRITE,
left, top, w, h);
- utrans = pipe
->get_tex
_transfer(pipe, dst[1],
+ utrans = pipe
_get
_transfer(pipe, dst[1],
0, 0, 0,
PIPE_TRANSFER_WRITE,
left, top, w, h);
0, 0, 0,
PIPE_TRANSFER_WRITE,
left, top, w, h);
- vtrans = pipe
->get_tex
_transfer(pipe, dst[2],
+ vtrans = pipe
_get
_transfer(pipe, dst[2],
0, 0, 0,
PIPE_TRANSFER_WRITE,
left, top, w, h);
0, 0, 0,
PIPE_TRANSFER_WRITE,
left, top, w, h);
@@
-395,9
+395,9
@@
copy_packed_data(ScrnInfoPtr pScrn,
pipe->transfer_unmap(pipe, ytrans);
pipe->transfer_unmap(pipe, utrans);
pipe->transfer_unmap(pipe, vtrans);
pipe->transfer_unmap(pipe, ytrans);
pipe->transfer_unmap(pipe, utrans);
pipe->transfer_unmap(pipe, vtrans);
- pipe->t
ex_t
ransfer_destroy(pipe, ytrans);
- pipe->t
ex_t
ransfer_destroy(pipe, utrans);
- pipe->t
ex_t
ransfer_destroy(pipe, vtrans);
+ pipe->transfer_destroy(pipe, ytrans);
+ pipe->transfer_destroy(pipe, utrans);
+ pipe->transfer_destroy(pipe, vtrans);
}
}
@@
-416,7
+416,7
@@
draw_yuv(struct xorg_xv_port_priv *port,
int src_x, int src_y, int src_w, int src_h,
int dst_x, int dst_y, int dst_w, int dst_h)
{
int src_x, int src_y, int src_w, int src_h,
int dst_x, int dst_y, int dst_w, int dst_h)
{
- struct pipe_
textur
e **textures = port->yuv[port->current_set];
+ struct pipe_
resourc
e **textures = port->yuv[port->current_set];
/*debug_printf(" draw_yuv([%d, %d, %d ,%d], [%d, %d, %d, %d])\n",
src_x, src_y, src_w, src_h,
/*debug_printf(" draw_yuv([%d, %d, %d ,%d], [%d, %d, %d, %d])\n",
src_x, src_y, src_w, src_h,
@@
-461,12
+461,12
@@
bind_shaders(struct xorg_xv_port_priv *port)
}
static INLINE void
}
static INLINE void
-conditional_flush(struct pipe_context *pipe, struct pipe_
textur
e **tex,
+conditional_flush(struct pipe_context *pipe, struct pipe_
resourc
e **tex,
int num)
{
int i;
for (i = 0; i < num; ++i) {
int num)
{
int i;
for (i = 0; i < num; ++i) {
- if (tex[i] && pipe->is_
textur
e_referenced(pipe, tex[i], 0, 0) &
+ if (tex[i] && pipe->is_
resourc
e_referenced(pipe, tex[i], 0, 0) &
PIPE_REFERENCED_FOR_WRITE) {
pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
return;
PIPE_REFERENCED_FOR_WRITE) {
pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
return;
@@
-479,7
+479,7
@@
bind_samplers(struct xorg_xv_port_priv *port)
{
struct pipe_sampler_state *samplers[PIPE_MAX_SAMPLERS];
struct pipe_sampler_state sampler;
{
struct pipe_sampler_state *samplers[PIPE_MAX_SAMPLERS];
struct pipe_sampler_state sampler;
- struct pipe_
textur
e **dst = port->yuv[port->current_set];
+ struct pipe_
resourc
e **dst = port->yuv[port->current_set];
struct pipe_sampler_view **dst_views = port->yuv_views[port->current_set];
memset(&sampler, 0, sizeof(struct pipe_sampler_state));
struct pipe_sampler_view **dst_views = port->yuv_views[port->current_set];
memset(&sampler, 0, sizeof(struct pipe_sampler_state));