diff options
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_program.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_screen.c | 1 |
2 files changed, 1 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index 9303dc85b9e..fa0ce838fa0 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -127,11 +127,7 @@ brw_create_nir(struct brw_context *brw, static unsigned get_new_program_id(struct intel_screen *screen) { - static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; - pthread_mutex_lock(&m); - unsigned id = screen->program_id++; - pthread_mutex_unlock(&m); - return id; + return p_atomic_inc_return(&screen->program_id); } static struct gl_program *brwNewProgram(struct gl_context *ctx, GLenum target, diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index bc2bba00b6a..bd1365f232b 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -2510,7 +2510,6 @@ __DRIconfig **intelInitScreen2(__DRIscreen *dri_screen) screen->compiler->shader_debug_log = shader_debug_log_mesa; screen->compiler->shader_perf_log = shader_perf_log_mesa; screen->compiler->constant_buffer_0_is_relative = devinfo->gen < 8; - screen->program_id = 1; screen->has_exec_fence = intel_get_boolean(screen, I915_PARAM_HAS_EXEC_FENCE); |