Lines Matching refs:nv50

210    struct nv50_context *nv50 = nv50_context(pipe);
212 nv50->blend = hwcso;
213 nv50->dirty |= NV50_NEW_BLEND;
339 struct nv50_context *nv50 = nv50_context(pipe);
341 nv50->rast = hwcso;
342 nv50->dirty |= NV50_NEW_RASTERIZER;
418 struct nv50_context *nv50 = nv50_context(pipe);
420 nv50->zsa = hwcso;
421 nv50->dirty |= NV50_NEW_ZSA;
561 nv50_stage_sampler_states_bind(struct nv50_context *nv50, int s,
567 struct nv50_tsc_entry *old = nv50->samplers[s][i];
569 nv50->samplers[s][i] = nv50_tsc_entry(hwcso[i]);
571 nv50_screen_tsc_unlock(nv50->screen, old);
573 for (; i < nv50->num_samplers[s]; ++i)
574 if (nv50->samplers[s][i])
575 nv50_screen_tsc_unlock(nv50->screen, nv50->samplers[s][i]);
577 nv50->num_samplers[s] = nr;
579 nv50->dirty |= NV50_NEW_SAMPLERS;
613 nv50_stage_set_sampler_views(struct nv50_context *nv50, int s,
620 struct nv50_tic_entry *old = nv50_tic_entry(nv50->textures[s][i]);
622 nv50_screen_tic_unlock(nv50->screen, old);
624 pipe_sampler_view_reference(&nv50->textures[s][i], views[i]);
627 for (i = nr; i < nv50->num_textures[s]; ++i) {
628 struct nv50_tic_entry *old = nv50_tic_entry(nv50->textures[s][i]);
631 nv50_screen_tic_unlock(nv50->screen, old);
633 pipe_sampler_view_reference(&nv50->textures[s][i], NULL);
636 nv50->num_textures[s] = nr;
638 nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_TEXTURES);
640 nv50->dirty |= NV50_NEW_TEXTURES;
710 struct nv50_context *nv50 = nv50_context(pipe);
712 nv50->vertprog = hwcso;
713 nv50->dirty |= NV50_NEW_VERTPROG;
726 struct nv50_context *nv50 = nv50_context(pipe);
728 nv50->fragprog = hwcso;
729 nv50->dirty |= NV50_NEW_FRAGPROG;
742 struct nv50_context *nv50 = nv50_context(pipe);
744 nv50->gmtyprog = hwcso;
745 nv50->dirty |= NV50_NEW_GMTYPROG;
752 struct nv50_context *nv50 = nv50_context(pipe);
760 if (nv50->constbuf[s][i].user)
761 nv50->constbuf[s][i].u.buf = NULL;
763 if (nv50->constbuf[s][i].u.buf)
764 nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_CB(s, i));
766 pipe_resource_reference(&nv50->constbuf[s][i].u.buf, res);
768 nv50->constbuf[s][i].user = (cb && cb->user_buffer) ? TRUE : FALSE;
769 if (nv50->constbuf[s][i].user) {
770 nv50->constbuf[s][i].u.data = cb->user_buffer;
771 nv50->constbuf[s][i].size = cb->buffer_size;
772 nv50->constbuf_valid[s] |= 1 << i;
775 nv50->constbuf[s][i].offset = cb->buffer_offset;
776 nv50->constbuf[s][i].size = align(cb->buffer_size, 0x100);
777 nv50->constbuf_valid[s] |= 1 << i;
779 nv50->constbuf_valid[s] &= ~(1 << i);
781 nv50->constbuf_dirty[s] |= 1 << i;
783 nv50->dirty |= NV50_NEW_CONSTBUF;
793 struct nv50_context *nv50 = nv50_context(pipe);
795 nv50->blend_colour = *bcol;
796 nv50->dirty |= NV50_NEW_BLEND_COLOUR;
803 struct nv50_context *nv50 = nv50_context(pipe);
805 nv50->stencil_ref = *sr;
806 nv50->dirty |= NV50_NEW_STENCIL_REF;
813 struct nv50_context *nv50 = nv50_context(pipe);
815 memcpy(nv50->clip.ucp, clip->ucp, sizeof(clip->ucp));
817 nv50->dirty |= NV50_NEW_CLIP;
823 struct nv50_context *nv50 = nv50_context(pipe);
825 nv50->sample_mask = sample_mask;
826 nv50->dirty |= NV50_NEW_SAMPLE_MASK;
834 struct nv50_context *nv50 = nv50_context(pipe);
837 nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_FB);
840 pipe_surface_reference(&nv50->framebuffer.cbufs[i], fb->cbufs[i]);
841 for (; i < nv50->framebuffer.nr_cbufs; ++i)
842 pipe_surface_reference(&nv50->framebuffer.cbufs[i], NULL);
844 nv50->framebuffer.nr_cbufs = fb->nr_cbufs;
846 nv50->framebuffer.width = fb->width;
847 nv50->framebuffer.height = fb->height;
849 pipe_surface_reference(&nv50->framebuffer.zsbuf, fb->zsbuf);
851 nv50->dirty |= NV50_NEW_FRAMEBUFFER;
858 struct nv50_context *nv50 = nv50_context(pipe);
860 nv50->stipple = *stipple;
861 nv50->dirty |= NV50_NEW_STIPPLE;
868 struct nv50_context *nv50 = nv50_context(pipe);
870 nv50->scissor = *scissor;
871 nv50->dirty |= NV50_NEW_SCISSOR;
878 struct nv50_context *nv50 = nv50_context(pipe);
880 nv50->viewport = *vpt;
881 nv50->dirty |= NV50_NEW_VIEWPORT;
889 struct nv50_context *nv50 = nv50_context(pipe);
892 nv50->vbo_user = nv50->vbo_constant = 0;
895 nv50->vtxbuf[i].stride = vb[i].stride;
896 pipe_resource_reference(&nv50->vtxbuf[i].buffer, vb[i].buffer);
898 nv50->vtxbuf[i].user_buffer = vb[i].user_buffer;
899 nv50->vbo_user |= 1 << i;
901 nv50->vbo_constant |= 1 << i;
903 nv50->vtxbuf[i].buffer_offset = vb[i].buffer_offset;
906 for (; i < nv50->num_vtxbufs; ++i)
907 pipe_resource_reference(&nv50->vtxbuf[i].buffer, NULL);
909 nv50->num_vtxbufs = count;
911 nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_VERTEX);
913 nv50->dirty |= NV50_NEW_ARRAYS;
920 struct nv50_context *nv50 = nv50_context(pipe);
922 if (nv50->idxbuf.buffer)
923 nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_INDEX);
926 pipe_resource_reference(&nv50->idxbuf.buffer, ib->buffer);
927 nv50->idxbuf.index_size = ib->index_size;
929 nv50->idxbuf.offset = ib->offset;
930 BCTX_REFN(nv50->bufctx_3d, INDEX, nv04_resource(ib->buffer), RD);
932 nv50->idxbuf.user_buffer = ib->user_buffer;
935 pipe_resource_reference(&nv50->idxbuf.buffer, NULL);
942 struct nv50_context *nv50 = nv50_context(pipe);
944 nv50->vertex = hwcso;
945 nv50->dirty |= NV50_NEW_VERTEX;
996 struct nv50_context *nv50 = nv50_context(pipe);
999 const boolean can_resume = nv50->screen->base.class_3d >= NVA0_3D_CLASS;
1004 const boolean changed = nv50->so_target[i] != targets[i];
1007 nv50->so_targets_dirty |= 1 << i;
1009 if (can_resume && changed && nv50->so_target[i]) {
1010 nva0_so_target_save_offset(pipe, nv50->so_target[i], i, serialize);
1017 pipe_so_target_reference(&nv50->so_target[i], targets[i]);
1019 for (; i < nv50->num_so_targets; ++i) {
1020 if (can_resume && nv50->so_target[i]) {
1021 nva0_so_target_save_offset(pipe, nv50->so_target[i], i, serialize);
1024 pipe_so_target_reference(&nv50->so_target[i], NULL);
1025 nv50->so_targets_dirty |= 1 << i;
1027 nv50->num_so_targets = num_targets;
1029 if (nv50->so_targets_dirty)
1030 nv50->dirty |= NV50_NEW_STRMOUT;
1034 nv50_init_state_functions(struct nv50_context *nv50)
1036 struct pipe_context *pipe = &nv50->base.pipe;