瀏覽代碼

draw: free more token arrays

The AA line and point code also needs to free token arrays after
building driver shaders.
tags/mesa_7_5_rc3
Keith Whitwell 16 年之前
父節點
當前提交
003cfd4dd2
共有 2 個檔案被更改,包括 12 行新增5 行删除
  1. 6
    3
      src/gallium/auxiliary/draw/draw_pipe_aaline.c
  2. 6
    2
      src/gallium/auxiliary/draw/draw_pipe_aapoint.c

+ 6
- 3
src/gallium/auxiliary/draw/draw_pipe_aaline.c 查看文件

@@ -60,8 +60,6 @@ struct aaline_fragment_shader
struct pipe_shader_state state;
void *driver_fs;
void *aaline_fs;
void *aapoint_fs; /* not yet */
void *sprite_fs; /* not yet */
uint sampler_unit;
int generic_attrib; /**< texcoord/generic used for texture */
};
@@ -373,10 +371,15 @@ generate_aaline_fs(struct aaline_stage *aaline)
aaline->fs->aaline_fs
= aaline->driver_create_fs_state(aaline->pipe, &aaline_fs);
if (aaline->fs->aaline_fs == NULL)
return FALSE;
goto fail;

aaline->fs->generic_attrib = transform.maxGeneric + 1;
FREE((void *)aaline_fs.tokens);
return TRUE;

fail:
FREE((void *)aaline_fs.tokens);
return FALSE;
}



+ 6
- 2
src/gallium/auxiliary/draw/draw_pipe_aapoint.c 查看文件

@@ -523,11 +523,15 @@ generate_aapoint_fs(struct aapoint_stage *aapoint)
aapoint->fs->aapoint_fs
= aapoint->driver_create_fs_state(aapoint->pipe, &aapoint_fs);
if (aapoint->fs->aapoint_fs == NULL)
return FALSE;
goto fail;

aapoint->fs->generic_attrib = transform.maxGeneric + 1;
FREE((void *)aapoint_fs.tokens);
return TRUE;

fail:
FREE((void *)aapoint_fs.tokens);
return FALSE;
}



Loading…
取消
儲存