Mesa (master): vega: move ureg_destroy(ureg) after last use of ureg var

Brian Paul brianp at kemper.freedesktop.org
Fri Apr 15 07:35:23 PDT 2011


Module: Mesa
Branch: master
Commit: 1b800c10e4aa3a9792e221043c54bbc930b50829
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1b800c10e4aa3a9792e221043c54bbc930b50829

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Apr 15 08:31:10 2011 -0600

vega: move ureg_destroy(ureg) after last use of ureg var

---

 src/gallium/state_trackers/vega/shaders_cache.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/state_trackers/vega/shaders_cache.c b/src/gallium/state_trackers/vega/shaders_cache.c
index 023996c..70d860d 100644
--- a/src/gallium/state_trackers/vega/shaders_cache.c
+++ b/src/gallium/state_trackers/vega/shaders_cache.c
@@ -229,7 +229,6 @@ combine_shaders(const struct shader_asm_info *shaders[SHADER_STAGES], int num_sh
       return NULL;
 
    p = pipe->create_fs_state(pipe, shader);
-   ureg_destroy(ureg);
 
    if (num_temps >= 1) {
       for (i = start_temp; i < end_temp; i++) {
@@ -237,6 +236,8 @@ combine_shaders(const struct shader_asm_info *shaders[SHADER_STAGES], int num_sh
       }
    }
 
+   ureg_destroy(ureg);
+
    if (temp)
       free(temp);
    if (constant)



More information about the mesa-commit mailing list