~mmach/netext73/mesa-haswell

« back to all changes in this revision

Viewing changes to src/gallium/frontends/nine/pixelshader9.c

  • Committer: mmach
  • Date: 2022-09-22 20:02:48 UTC
  • Revision ID: netbit73@gmail.com-20220922200248-7y4wybmdgipuwdiw
2022-09-22 21:17:09

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
 
118
118
        do {
119
119
            if (var->cso) {
120
 
                if (This->base.device->context.cso_shader.ps == var->cso)
 
120
                if (This->base.device->context.cso_shader.ps == var->cso) {
 
121
                    /* unbind because it is illegal to delete something bound */
121
122
                    pipe->bind_fs_state(pipe, NULL);
 
123
                    /* This will rebind cso_shader.ps in case somehow actually
 
124
                     * an identical shader with same cso is bound */
 
125
                    This->base.device->context.commit |= NINE_STATE_COMMIT_PS;
 
126
                }
122
127
                pipe->delete_fs_state(pipe, var->cso);
123
128
                FREE(var->const_ranges);
124
129
            }
126
131
        } while (var);
127
132
 
128
133
        if (This->ff_cso) {
129
 
            if (This->ff_cso == This->base.device->context.cso_shader.ps)
 
134
            if (This->ff_cso == This->base.device->context.cso_shader.ps) {
130
135
                pipe->bind_fs_state(pipe, NULL);
 
136
                This->base.device->context.commit |= NINE_STATE_COMMIT_PS;
 
137
            }
131
138
            pipe->delete_fs_state(pipe, This->ff_cso);
132
139
        }
133
140
    }