**************************************************************************/
#include "vl_compositor.h"
+#include "util/u_draw.h"
#include <assert.h>
#include <pipe/p_context.h>
#include <util/u_inlines.h>
c->pipe->bind_fs_state(c->pipe, frag_shaders[i]);
c->pipe->set_fragment_sampler_views(c->pipe, 1, &surface_view);
- c->pipe->draw_arrays(c->pipe, PIPE_PRIM_TRIANGLES, i * 6, 6);
+ util_draw_arrays(c->pipe, PIPE_PRIM_TRIANGLES, i * 6, 6);
if (delete_view) {
pipe_sampler_view_reference(&surface_view, NULL);
**************************************************************************/
#include "vl_mpeg12_mc_renderer.h"
+#include "util/u_draw.h"
#include <assert.h>
#include <pipe/p_context.h>
#include <util/u_inlines.h>
r->pipe->bind_vs_state(r->pipe, r->i_vs);
r->pipe->bind_fs_state(r->pipe, r->i_fs);
- r->pipe->draw_arrays(r->pipe, PIPE_PRIM_TRIANGLES, vb_start,
- num_macroblocks[MACROBLOCK_TYPE_INTRA] * 24);
+ util_draw_arrays(r->pipe, PIPE_PRIM_TRIANGLES, vb_start,
+ num_macroblocks[MACROBLOCK_TYPE_INTRA] * 24);
vb_start += num_macroblocks[MACROBLOCK_TYPE_INTRA] * 24;
}
r->pipe->bind_vs_state(r->pipe, r->p_vs[0]);
r->pipe->bind_fs_state(r->pipe, r->p_fs[0]);
- r->pipe->draw_arrays(r->pipe, PIPE_PRIM_TRIANGLES, vb_start,
- num_macroblocks[MACROBLOCK_TYPE_FWD_FRAME_PRED] * 24);
+ util_draw_arrays(r->pipe, PIPE_PRIM_TRIANGLES, vb_start,
+ num_macroblocks[MACROBLOCK_TYPE_FWD_FRAME_PRED] * 24);
vb_start += num_macroblocks[MACROBLOCK_TYPE_FWD_FRAME_PRED] * 24;
}
r->pipe->bind_vs_state(r->pipe, r->p_vs[1]);
r->pipe->bind_fs_state(r->pipe, r->p_fs[1]);
- r->pipe->draw_arrays(r->pipe, PIPE_PRIM_TRIANGLES, vb_start,
- num_macroblocks[MACROBLOCK_TYPE_FWD_FIELD_PRED] * 24);
+ util_draw_arrays(r->pipe, PIPE_PRIM_TRIANGLES, vb_start,
+ num_macroblocks[MACROBLOCK_TYPE_FWD_FIELD_PRED] * 24);
vb_start += num_macroblocks[MACROBLOCK_TYPE_FWD_FIELD_PRED] * 24;
}
r->pipe->bind_vs_state(r->pipe, r->p_vs[0]);
r->pipe->bind_fs_state(r->pipe, r->p_fs[0]);
- r->pipe->draw_arrays(r->pipe, PIPE_PRIM_TRIANGLES, vb_start,
- num_macroblocks[MACROBLOCK_TYPE_BKWD_FRAME_PRED] * 24);
+ util_draw_arrays(r->pipe, PIPE_PRIM_TRIANGLES, vb_start,
+ num_macroblocks[MACROBLOCK_TYPE_BKWD_FRAME_PRED] * 24);
vb_start += num_macroblocks[MACROBLOCK_TYPE_BKWD_FRAME_PRED] * 24;
}
r->pipe->bind_vs_state(r->pipe, r->p_vs[1]);
r->pipe->bind_fs_state(r->pipe, r->p_fs[1]);
- r->pipe->draw_arrays(r->pipe, PIPE_PRIM_TRIANGLES, vb_start,
- num_macroblocks[MACROBLOCK_TYPE_BKWD_FIELD_PRED] * 24);
+ util_draw_arrays(r->pipe, PIPE_PRIM_TRIANGLES, vb_start,
+ num_macroblocks[MACROBLOCK_TYPE_BKWD_FIELD_PRED] * 24);
vb_start += num_macroblocks[MACROBLOCK_TYPE_BKWD_FIELD_PRED] * 24;
}
r->pipe->bind_vs_state(r->pipe, r->b_vs[0]);
r->pipe->bind_fs_state(r->pipe, r->b_fs[0]);
- r->pipe->draw_arrays(r->pipe, PIPE_PRIM_TRIANGLES, vb_start,
- num_macroblocks[MACROBLOCK_TYPE_BI_FRAME_PRED] * 24);
+ util_draw_arrays(r->pipe, PIPE_PRIM_TRIANGLES, vb_start,
+ num_macroblocks[MACROBLOCK_TYPE_BI_FRAME_PRED] * 24);
vb_start += num_macroblocks[MACROBLOCK_TYPE_BI_FRAME_PRED] * 24;
}
r->pipe->bind_vs_state(r->pipe, r->b_vs[1]);
r->pipe->bind_fs_state(r->pipe, r->b_fs[1]);
- r->pipe->draw_arrays(r->pipe, PIPE_PRIM_TRIANGLES, vb_start,
- num_macroblocks[MACROBLOCK_TYPE_BI_FIELD_PRED] * 24);
+ util_draw_arrays(r->pipe, PIPE_PRIM_TRIANGLES, vb_start,
+ num_macroblocks[MACROBLOCK_TYPE_BI_FIELD_PRED] * 24);
vb_start += num_macroblocks[MACROBLOCK_TYPE_BI_FIELD_PRED] * 24;
}
#include <util/u_memory.h>
#include <util/u_rect.h>
#include <util/u_video.h>
+#include <util/u_surface.h>
#include "sp_public.h"
#include "sp_texture.h"
if (geom & PIPE_TEXTURE_GEOM_NON_POWER_OF_TWO)
return FALSE;
- return ctx->pipe->screen->is_format_supported(ctx->pipe->screen, PIPE_TEXTURE_2D,
- format, usage, geom);
+ return ctx->pipe->screen->is_format_supported(ctx->pipe->screen, format, PIPE_TEXTURE_2D,
+ 0, usage, geom);
}
static void
unsigned value)
{
struct sp_mpeg12_context *ctx = (struct sp_mpeg12_context*)vpipe;
+ float rgba[4] = { 0, 0, 0, 0 };
assert(vpipe);
assert(dst);
- if (ctx->pipe->surface_fill)
- ctx->pipe->surface_fill(ctx->pipe, dst, dstx, dsty, width, height, value);
+ if (ctx->pipe->clear_render_target)
+ ctx->pipe->clear_render_target(ctx->pipe, dst, rgba, dstx, dsty, width, height);
else
- util_surface_fill(ctx->pipe, dst, dstx, dsty, width, height, value);
+ util_clear_render_target(ctx->pipe, dst, rgba, dstx, dsty, width, height);
}
static void
assert(vpipe);
assert(dst);
- if (ctx->pipe->surface_copy)
- ctx->pipe->surface_copy(ctx->pipe, dst, dstx, dsty, src, srcx, srcy, width, height);
+ struct pipe_subresource subdst, subsrc;
+ subdst.face = dst->face;
+ subdst.level = dst->level;
+ subsrc.face = src->face;
+ subsrc.level = src->level;
+
+ if (ctx->pipe->resource_copy_region)
+ ctx->pipe->resource_copy_region(ctx->pipe, dst->texture, subdst, dstx, dsty, dst->zslice,
+ src->texture, subsrc, srcx, srcy, src->zslice,
+ width, height);
else
- util_surface_copy(ctx->pipe, FALSE, dst, dstx, dsty, src, srcx, srcy, width, height);
+ util_resource_copy_region(ctx->pipe, dst->texture, subdst, dstx, dsty, dst->zslice,
+ src->texture, subsrc, srcx, srcy, src->zslice,
+ width, height);
}
static struct pipe_transfer*
rast.flatshade = 1;
rast.flatshade_first = 0;
rast.light_twoside = 0;
- rast.front_winding = PIPE_WINDING_CCW;
- rast.cull_mode = PIPE_WINDING_CW;
- rast.fill_cw = PIPE_POLYGON_MODE_FILL;
- rast.fill_ccw = PIPE_POLYGON_MODE_FILL;
- rast.offset_cw = 0;
- rast.offset_ccw = 0;
+ rast.front_ccw = 1;
+ rast.cull_face = PIPE_FACE_NONE;
+ rast.fill_back = PIPE_POLYGON_MODE_FILL;
+ rast.fill_front = PIPE_POLYGON_MODE_FILL;
+ rast.offset_point = 0;
+ rast.offset_line = 0;
rast.scissor = 0;
rast.poly_smooth = 0;
rast.poly_stipple_enable = 0;
templat.height0 = height;
templat.depth0 = 1;
templat.usage = PIPE_USAGE_DEFAULT;
- templat.bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_DISPLAY_TARGET | PIPE_BIND_BLIT_SOURCE;
+ templat.bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_DISPLAY_TARGET;
templat.flags = 0;
drawable_tex = vscreen->pscreen->resource_create(vscreen->pscreen, &templat);