예제 #1
0
파일: nv50_surface.c 프로젝트: UIKit0/mesa
static void
nv50_blit_set_dst(struct nv50_context *nv50, struct pipe_surface *surf,
                  struct nv50_blitctx *blit)
{
   blit->saved.format = surf->format;

   if (util_format_is_depth_or_stencil(surf->format))
      surf->format = nv50_blit_zeta_to_colour_format(surf->format);

   nv50->framebuffer.cbufs[0] = surf;
   nv50->framebuffer.nr_cbufs = 1;
   nv50->framebuffer.zsbuf = NULL;
   nv50->framebuffer.width = surf->width;
   nv50->framebuffer.height = surf->height;
}
예제 #2
0
파일: nv50_surface.c 프로젝트: nikai3d/mesa
static void
nv50_blit_set_dst(struct nv50_context *nv50,
                  struct pipe_resource *res, unsigned level, unsigned layer)
{
   struct pipe_context *pipe = &nv50->base.pipe;
   struct pipe_surface templ;

   if (util_format_is_depth_or_stencil(res->format))
      templ.format = nv50_blit_zeta_to_colour_format(res->format);
   else
      templ.format = res->format;

   templ.usage = PIPE_USAGE_STREAM;
   templ.u.tex.level = level;
   templ.u.tex.first_layer = templ.u.tex.last_layer = layer;

   nv50->framebuffer.cbufs[0] = nv50_miptree_surface_new(pipe, res, &templ);
   nv50->framebuffer.nr_cbufs = 1;
   nv50->framebuffer.zsbuf = NULL;
   nv50->framebuffer.width = nv50->framebuffer.cbufs[0]->width;
   nv50->framebuffer.height = nv50->framebuffer.cbufs[0]->height;
}