~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/mesa/main/robustness.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
      return GL_NO_ERROR;
134
134
   }
135
135
 
136
 
   if (ctx->Driver.GetGraphicsResetStatus) {
137
 
      /* Query the reset status of this context from the driver core.
138
 
       */
 
136
   /* Query the reset status of this context from the driver core. */
 
137
   if (ctx->Driver.GetGraphicsResetStatus)
139
138
      status = ctx->Driver.GetGraphicsResetStatus(ctx);
140
139
 
141
 
      simple_mtx_lock(&ctx->Shared->Mutex);
142
 
 
143
 
      /* If this context has not been affected by a GPU reset, check to see if
144
 
       * some other context in the share group has been affected by a reset.
145
 
       * If another context saw a reset but this context did not, assume that
146
 
       * this context was not guilty.
147
 
       */
148
 
      if (status != GL_NO_ERROR) {
149
 
         ctx->Shared->ShareGroupReset = true;
150
 
         ctx->Shared->DisjointOperation = true;
151
 
      } else if (ctx->Shared->ShareGroupReset && !ctx->ShareGroupReset) {
152
 
         status = GL_INNOCENT_CONTEXT_RESET_ARB;
153
 
      }
154
 
 
155
 
      ctx->ShareGroupReset = ctx->Shared->ShareGroupReset;
156
 
      simple_mtx_unlock(&ctx->Shared->Mutex);
157
 
   }
158
 
 
159
140
   if (status != GL_NO_ERROR)
160
141
      _mesa_set_context_lost_dispatch(ctx);
161
142