/**
* @file
* Copy/blit pixel rect between surfaces
- *
+ *
* @author Brian Paul
*/
ctx->rasterizer.cull_face = PIPE_FACE_NONE;
ctx->rasterizer.half_pixel_center = 1;
ctx->rasterizer.bottom_edge_rule = 1;
- ctx->rasterizer.depth_clip = 1;
+ ctx->rasterizer.depth_clip_near = 1;
+ ctx->rasterizer.depth_clip_far = 1;
/* samplers */
ctx->sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE;
for (i = 0; i < 2; i++) {
ctx->velem[i].src_offset = i * 4 * sizeof(float);
ctx->velem[i].instance_divisor = 0;
- ctx->velem[i].vertex_buffer_index = cso_get_aux_vertex_buffer_slot(cso);
+ ctx->velem[i].vertex_buffer_index = 0;
ctx->velem[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
}
assert(stype == TGSI_RETURN_TYPE_FLOAT);
idx = 3;
if (!ctx->fs[pipe_tex][idx]) {
- enum tgsi_texture_type tgsi_tex = util_pipe_tex_to_tgsi_tex(pipe_tex, 0);
+ enum tgsi_texture_type tgsi_tex =
+ util_pipe_tex_to_tgsi_tex(pipe_tex, 0);
ctx->fs[pipe_tex][idx] =
util_make_fragment_tex_shader_xrbias(ctx->pipe, tgsi_tex);
}
}
-
else if (!ctx->fs[pipe_tex][idx]) {
- unsigned tgsi_tex = util_pipe_tex_to_tgsi_tex(pipe_tex, 0);
+ enum tgsi_texture_type tgsi_tex = util_pipe_tex_to_tgsi_tex(pipe_tex, 0);
/* OpenGL does not allow blits from signed to unsigned integer
* or vice versa. */
* Get offset of next free slot in vertex buffer for quad vertices.
*/
static unsigned
-get_next_slot( struct blit_state *ctx )
+get_next_slot(struct blit_state *ctx)
{
const unsigned max_slots = 4096 / sizeof ctx->vertices;
PIPE_USAGE_STREAM,
max_slots * sizeof ctx->vertices);
}
-
+
return ctx->vbuf_slot++ * sizeof ctx->vertices;
}
*/
static unsigned
setup_vertex_data_tex(struct blit_state *ctx,
- unsigned src_target,
+ enum pipe_texture_target src_target,
unsigned src_face,
float x0, float y0, float x1, float y1,
float s0, float t0, float s1, float t1,
if (src_target == PIPE_TEXTURE_CUBE ||
src_target == PIPE_TEXTURE_CUBE_ARRAY) {
/* Map cubemap texture coordinates inplace. */
- const unsigned stride = sizeof ctx->vertices[0] / sizeof ctx->vertices[0][0][0];
+ const unsigned stride =
+ sizeof ctx->vertices[0] / sizeof ctx->vertices[0][0][0];
util_map_texcoords2d_onto_cubemap(src_face,
&ctx->vertices[0][1][0], stride,
&ctx->vertices[0][1][0], stride,
TRUE);
}
- offset = get_next_slot( ctx );
+ offset = get_next_slot(ctx);
if (ctx->vbuf) {
pipe_buffer_write_nooverlap(ctx->pipe, ctx->vbuf,
struct pipe_surface *dst,
int dstX0, int dstY0,
int dstX1, int dstY1,
- MAYBE_UNUSED float z, uint filter,
+ MAYBE_UNUSED float z,
+ enum pipe_tex_filter filter,
uint writemask)
{
struct pipe_context *pipe = ctx->pipe;
struct pipe_surface *dst,
int dstX0, int dstY0,
int dstX1, int dstY1,
- float z, uint filter,
+ float z, enum pipe_tex_filter filter,
boolean src_xrbias)
{
boolean normalized = src_sampler_view->texture->target != PIPE_TEXTURE_RECT;
t0 = (float) srcY0;
t1 = (float) srcY1;
- if(normalized)
- {
+ if (normalized) {
/* normalize according to the mipmap level's size */
int level = src_sampler_view->u.tex.first_level;
float w = (float) u_minify(tex->width0, level);
assert(ctx->pipe->screen->is_format_supported(ctx->pipe->screen, dst->format,
PIPE_TEXTURE_2D,
dst->texture->nr_samples,
+ dst->texture->nr_storage_samples,
PIPE_BIND_RENDER_TARGET));
/* save state (restored below) */
s0, t0, s1, t1,
z);
- util_draw_vertex_buffer(ctx->pipe, ctx->cso, ctx->vbuf,
- cso_get_aux_vertex_buffer_slot(ctx->cso),
+ util_draw_vertex_buffer(ctx->pipe, ctx->cso, ctx->vbuf, 0,
offset,
PIPE_PRIM_TRIANGLE_FAN,
4, /* verts */