Home | History | Annotate | Download | only in nvc0

Lines Matching defs:nvc0

194     struct nvc0_context *nvc0 = nvc0_context(pipe);
196 nvc0->blend = hwcso;
197 nvc0->dirty |= NVC0_NEW_BLEND;
322 struct nvc0_context *nvc0 = nvc0_context(pipe);
324 nvc0->rast = hwcso;
325 nvc0->dirty |= NVC0_NEW_RASTERIZER;
393 struct nvc0_context *nvc0 = nvc0_context(pipe);
395 nvc0->zsa = hwcso;
396 nvc0->dirty |= NVC0_NEW_ZSA;
445 nvc0_stage_sampler_states_bind(struct nvc0_context *nvc0, int s,
451 struct nv50_tsc_entry *old = nvc0->samplers[s][i];
455 nvc0->samplers_dirty[s] |= 1 << i;
457 nvc0->samplers[s][i] = nv50_tsc_entry(hwcso[i]);
459 nvc0_screen_tsc_unlock(nvc0->screen, old);
461 for (; i < nvc0->num_samplers[s]; ++i) {
462 if (nvc0->samplers[s][i]) {
463 nvc0_screen_tsc_unlock(nvc0->screen, nvc0->samplers[s][i]);
464 nvc0->samplers[s][i] = NULL;
468 nvc0->num_samplers[s] = nr;
470 nvc0->dirty |= NVC0_NEW_SAMPLERS;
504 nvc0_stage_set_sampler_views(struct nvc0_context *nvc0, int s,
511 struct nv50_tic_entry *old = nv50_tic_entry(nvc0->textures[s][i]);
513 if (views[i] == nvc0->textures[s][i])
515 nvc0->textures_dirty[s] |= 1 << i;
518 nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_TEX(s, i));
519 nvc0_screen_tic_unlock(nvc0->screen, old);
522 pipe_sampler_view_reference(&nvc0->textures[s][i], views[i]);
525 for (i = nr; i < nvc0->num_textures[s]; ++i) {
526 struct nv50_tic_entry *old = nv50_tic_entry(nvc0->textures[s][i]);
528 nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_TEX(s, i));
529 nvc0_screen_tic_unlock(nvc0->screen, old);
530 pipe_sampler_view_reference(&nvc0->textures[s][i], NULL);
534 nvc0->num_textures[s] = nr;
536 nvc0->dirty |= NVC0_NEW_TEXTURES;
608 struct nvc0_context *nvc0 = nvc0_context(pipe);
610 nvc0->vertprog = hwcso;
611 nvc0->dirty |= NVC0_NEW_VERTPROG;
624 struct nvc0_context *nvc0 = nvc0_context(pipe);
626 nvc0->fragprog = hwcso;
627 nvc0->dirty |= NVC0_NEW_FRAGPROG;
640 struct nvc0_context *nvc0 = nvc0_context(pipe);
642 nvc0->gmtyprog = hwcso;
643 nvc0->dirty |= NVC0_NEW_GMTYPROG;
650 struct nvc0_context *nvc0 = nvc0_context(pipe);
658 if (nvc0->constbuf[s][i].user)
659 nvc0->constbuf[s][i].u.buf = NULL;
661 if (nvc0->constbuf[s][i].u.buf)
662 nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_CB(s, i));
664 pipe_resource_reference(&nvc0->constbuf[s][i].u.buf, res);
666 nvc0->constbuf[s][i].user = (cb && cb->user_buffer) ? TRUE : FALSE;
667 if (nvc0->constbuf[s][i].user) {
668 nvc0->constbuf[s][i].u.data = cb->user_buffer;
669 nvc0->constbuf[s][i].size = cb->buffer_size;
672 nvc0->constbuf[s][i].offset = cb->buffer_offset;
673 nvc0->constbuf[s][i].size = align(cb->buffer_size, 0x100);
676 nvc0->constbuf_dirty[s] |= 1 << i;
678 nvc0->dirty |= NVC0_NEW_CONSTBUF;
688 struct nvc0_context *nvc0 = nvc0_context(pipe);
690 nvc0->blend_colour = *bcol;
691 nvc0->dirty |= NVC0_NEW_BLEND_COLOUR;
698 struct nvc0_context *nvc0 = nvc0_context(pipe);
700 nvc0->stencil_ref = *sr;
701 nvc0->dirty |= NVC0_NEW_STENCIL_REF;
708 struct nvc0_context *nvc0 = nvc0_context(pipe);
710 memcpy(nvc0->clip.ucp, clip->ucp, sizeof(clip->ucp));
712 nvc0->dirty |= NVC0_NEW_CLIP;
718 struct nvc0_context *nvc0 = nvc0_context(pipe);
720 nvc0->sample_mask = sample_mask;
721 nvc0->dirty |= NVC0_NEW_SAMPLE_MASK;
729 struct nvc0_context *nvc0 = nvc0_context(pipe);
732 nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_FB);
735 pipe_surface_reference(&nvc0->framebuffer.cbufs[i], fb->cbufs[i]);
736 for (; i < nvc0->framebuffer.nr_cbufs; ++i)
737 pipe_surface_reference(&nvc0->framebuffer.cbufs[i], NULL);
739 nvc0->framebuffer.nr_cbufs = fb->nr_cbufs;
741 nvc0->framebuffer.width = fb->width;
742 nvc0->framebuffer.height = fb->height;
744 pipe_surface_reference(&nvc0->framebuffer.zsbuf, fb->zsbuf);
746 nvc0->dirty |= NVC0_NEW_FRAMEBUFFER;
753 struct nvc0_context *nvc0 = nvc0_context(pipe);
755 nvc0->stipple = *stipple;
756 nvc0->dirty |= NVC0_NEW_STIPPLE;
763 struct nvc0_context *nvc0 = nvc0_context(pipe);
765 nvc0->scissor = *scissor;
766 nvc0->dirty |= NVC0_NEW_SCISSOR;
773 struct nvc0_context *nvc0 = nvc0_context(pipe);
775 nvc0->viewport = *vpt;
776 nvc0->dirty |= NVC0_NEW_VIEWPORT;
784 struct nvc0_context *nvc0 = nvc0_context(pipe);
788 nvc0->vbo_user = 0;
790 if (count != nvc0->num_vtxbufs) {
792 pipe_resource_reference(&nvc0->vtxbuf[i].buffer, vb[i].buffer);
794 nvc0->vbo_user |= 1 << i;
795 nvc0->vtxbuf[i].user_buffer = vb[i].user_buffer;
799 nvc0->vtxbuf[i].buffer_offset = vb[i].buffer_offset;
801 nvc0->vtxbuf[i].stride = vb[i].stride;
803 for (; i < nvc0->num_vtxbufs; ++i)
804 pipe_resource_reference(&nvc0->vtxbuf[i].buffer, NULL);
806 nvc0->num_vtxbufs = count;
807 nvc0->dirty |= NVC0_NEW_ARRAYS;
811 nvc0->vtxbuf[i].user_buffer = vb[i].user_buffer;
812 nvc0->vbo_user |= 1 << i;
817 if (nvc0->vtxbuf[i].buffer == vb[i].buffer &&
818 nvc0->vtxbuf[i].buffer_offset == vb[i].buffer_offset &&
819 nvc0->vtxbuf[i].stride == vb[i].stride)
821 pipe_resource_reference(&nvc0->vtxbuf[i].buffer, vb[i].buffer);
822 nvc0->vtxbuf[i].buffer_offset = vb[i].buffer_offset;
823 nvc0->vtxbuf[i].stride = vb[i].stride;
824 nvc0->dirty |= NVC0_NEW_ARRAYS;
827 if (constant_vbos != nvc0->constant_vbos) {
828 nvc0->constant_vbos = constant_vbos;
829 nvc0->dirty |= NVC0_NEW_ARRAYS;
832 if (nvc0->dirty & NVC0_NEW_ARRAYS)
833 nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_VTX);
840 struct nvc0_context *nvc0 = nvc0_context(pipe);
842 if (nvc0->idxbuf.buffer)
843 nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_IDX);
846 pipe_resource_reference(&nvc0->idxbuf.buffer, ib->buffer);
847 nvc0->idxbuf.index_size = ib->index_size;
849 nvc0->idxbuf.offset = ib->offset;
850 nvc0->dirty |= NVC0_NEW_IDXBUF;
852 nvc0->idxbuf.user_buffer = ib->user_buffer;
853 nvc0->dirty &= ~NVC0_NEW_IDXBUF;
856 nvc0->dirty &= ~NVC0_NEW_IDXBUF;
857 pipe_resource_reference(&nvc0->idxbuf.buffer, NULL);
864 struct nvc0_context *nvc0 = nvc0_context(pipe);
866 nvc0->vertex = hwcso;
867 nvc0->dirty |= NVC0_NEW_VERTEX;
912 struct nvc0_context *nvc0 = nvc0_context(pipe);
919 if (nvc0->tfbbuf[i] == targets[i] && (append_mask & (1 << i)))
921 nvc0->tfbbuf_dirty |= 1 << i;
923 if (nvc0->tfbbuf[i] && nvc0->tfbbuf[i] != targets[i])
924 nvc0_so_target_save_offset(pipe, nvc0->tfbbuf[i], i, &serialize);
929 pipe_so_target_reference(&nvc0->tfbbuf[i], targets[i]);
931 for (; i < nvc0->num_tfbbufs; ++i) {
932 nvc0->tfbbuf_dirty |= 1 << i;
933 nvc0_so_target_save_offset(pipe, nvc0->tfbbuf[i], i, &serialize);
934 pipe_so_target_reference(&nvc0->tfbbuf[i], NULL);
936 nvc0->num_tfbbufs = num_targets;
938 if (nvc0->tfbbuf_dirty)
939 nvc0->dirty |= NVC0_NEW_TFB_TARGETS;
943 nvc0_init_state_functions(struct nvc0_context *nvc0)
945 struct pipe_context *pipe = &nvc0->base.pipe;