Home | History | Annotate | Download | only in nvc0

Lines Matching defs:blit

472 nvc0_blitctx_make_vp(struct nvc0_blitctx *blit)
483 blit->vp.type = PIPE_SHADER_VERTEX;
484 blit->vp.translated = TRUE;
485 blit->vp.code = (uint32_t *)code; /* no relocations -> no modification */
486 blit->vp.code_size = sizeof(code);
487 blit->vp.max_gpr = 6;
488 blit->vp.vp.edgeflag = PIPE_MAX_ATTRIBS;
490 blit->vp.hdr[0] = 0x00020461; /* vertprog magic */
491 blit->vp.hdr[4] = 0x000ff000; /* no outputs read */
492 blit->vp.hdr[6] = 0x0000003f; /* a[0x80], a[0x90] */
493 blit->vp.hdr[13] = 0x0003f000; /* o[0x70], o[0x80] */
497 nvc0_blitctx_make_fp(struct nvc0_blitctx *blit)
644 blit->fp.type = PIPE_SHADER_FRAGMENT;
645 blit->fp.translated = TRUE;
646 if (blit->screen->base.class_3d >= NVE4_3D_CLASS) {
647 blit->fp.code = (uint32_t *)code_nve4; /* const_cast */
648 blit->fp.code_size = sizeof(code_nve4);
650 blit->fp.code = (uint32_t *)code_nvc0; /* const_cast */
651 blit->fp.code_size = sizeof(code_nvc0);
653 blit->fp.max_gpr = 4;
655 blit->fp.hdr[0] = 0x00021462; /* fragprog magic */
656 blit->fp.hdr[5] = 0x80000000;
657 blit->fp.hdr[6] = 0x0000000f; /* 2 linear */
658 blit->fp.hdr[18] = 0x0000000f; /* 1 colour output */
662 nvc0_blitctx_make_sampler(struct nvc0_blitctx *blit)
666 blit->sampler[0].id = -1;
668 blit->sampler[0].tsc[0] = NV50_TSC_0_SRGB_CONVERSION_ALLOWED |
672 blit->sampler[0].tsc[1] =
677 blit->sampler[1].id = -1;
679 blit->sampler[1].tsc[0] = blit->sampler[0].tsc[0];
680 blit->sampler[1].tsc[1] =
704 nvc0_blitctx_get_color_mask_and_fp(struct nvc0_blitctx *blit,
707 blit->color_mask = 0;
712 blit->fp_offset = 0x180;
714 blit->color_mask |= 0x0111;
716 blit->color_mask |= 0x1000;
719 blit->fp_offset = 0x80;
721 blit->color_mask |= 0x1110;
723 blit->color_mask |= 0x0001;
726 blit->fp_offset = 0;
727 if (mask & (PIPE_MASK_R | PIPE_MASK_Z)) blit->color_mask |= 0x0001;
728 if (mask & (PIPE_MASK_G | PIPE_MASK_S)) blit->color_mask |= 0x0010;
729 if (mask & PIPE_MASK_B) blit->color_mask |= 0x0100;
730 if (mask & PIPE_MASK_A) blit->color_mask |= 0x1000;
811 nvc0_blitctx_prepare_state(struct nvc0_blitctx *blit)
813 struct nouveau_pushbuf *push = blit->screen->base.pushbuf;
819 PUSH_DATA (push, blit->color_mask);
852 nvc0_blitctx_pre_blit(struct nvc0_blitctx *blit, struct nvc0_context *nvc0)
856 blit->saved.fb.width = nvc0->framebuffer.width;
857 blit->saved.fb.height = nvc0->framebuffer.height;
858 blit->saved.fb.nr_cbufs = nvc0->framebuffer.nr_cbufs;
859 blit->saved.fb.cbufs[0] = nvc0->framebuffer.cbufs[0];
860 blit->saved.fb.zsbuf = nvc0->framebuffer.zsbuf;
862 blit->saved.vp = nvc0->vertprog;
863 blit->saved.tcp = nvc0->tctlprog;
864 blit->saved.tep = nvc0->tevlprog;
865 blit->saved.gp = nvc0->gmtyprog;
866 blit->saved.fp = nvc0->fragprog;
868 nvc0->vertprog = &blit->vp;
869 nvc0->fragprog = &blit->fp;
875 blit->saved.num_textures[s] = nvc0->num_textures[s];
876 blit->saved.num_samplers[s] = nvc0->num_samplers[s];
880 blit->saved.texture[0] = nvc0->textures[4][0];
881 blit->saved.texture[1] = nvc0->textures[4][1];
882 blit->saved.sampler[0] = nvc0->samplers[4][0];
883 blit->saved.sampler[1] = nvc0->samplers[4][1];
885 nvc0->samplers[4][0] = &blit->sampler[blit->filter];
886 nvc0->samplers[4][1] = &blit->sampler[blit->filter];
892 blit->saved.dirty = nvc0->dirty;
904 nvc0_blitctx_post_blit(struct nvc0_context *nvc0, struct nvc0_blitctx *blit)
910 nvc0->framebuffer.width = blit->saved.fb.width;
911 nvc0->framebuffer.height = blit->saved.fb.height;
912 nvc0->framebuffer.nr_cbufs = blit->saved.fb.nr_cbufs;
913 nvc0->framebuffer.cbufs[0] = blit->saved.fb.cbufs[0];
914 nvc0->framebuffer.zsbuf = blit->saved.fb.zsbuf;
916 nvc0->vertprog = blit->saved.vp;
917 nvc0->tctlprog = blit->saved.tcp;
918 nvc0->tevlprog = blit->saved.tep;
919 nvc0->gmtyprog = blit->saved.gp;
920 nvc0->fragprog = blit->saved.fp;
926 nvc0->num_textures[s] = blit->saved.num_textures[s];
927 nvc0->num_samplers[s] = blit->saved.num_samplers[s];
931 nvc0->textures[4][0] = blit->saved.texture[0];
932 nvc0->textures[4][1] = blit->saved.texture[1];
933 nvc0->samplers[4][0] = blit->saved.sampler[0];
934 nvc0->samplers[4][1] = blit->saved.sampler[1];
939 nvc0->dirty = blit->saved.dirty |
954 struct nvc0_blitctx *blit = screen->blitctx;
967 nvc0_blitctx_get_color_mask_and_fp(blit, dst->format, info->mask);
969 blit->filter = util_format_is_depth_or_stencil(dst->format) ? 0 : 1;
971 nvc0_blitctx_pre_blit(blit, nvc0);
974 nvc0_blit_set_src(nvc0, src, 0, info->src.layer, blit->filter);
976 nvc0_blitctx_prepare_state(blit);
1000 blit->fp.code_base + blit->fp_offset);
1048 nvc0_blitctx_post_blit(nvc0, blit);
1056 NOUVEAU_ERR("failed to allocate blit context\n");