diff options
author | Thomas Balling Sørensen <tball@tball-laptop.(none)> | 2010-10-05 12:04:08 +0200 |
---|---|---|
committer | Thomas Balling Sørensen <tball@tball-laptop.(none)> | 2010-10-05 12:04:08 +0200 |
commit | 1218430e1200a08cd64b6555d3fd1fd0274ad9e5 (patch) | |
tree | e060fb27b8388a4bd237ca39fc20f1675c5e367c /src/gallium/drivers/trace/tr_state.c | |
parent | 63b1525cf0a50e3d31328c3b56355a86056e4c05 (diff) | |
parent | bf21b7006c63c3dc47045c22d4f372dfe6c7ce67 (diff) |
Merge branch 'master' into pipe-video
Conflicts:
configs/linux-dri
configure.ac
src/gallium/drivers/nvfx/Makefile
src/gallium/include/pipe/p_defines.h
src/gallium/include/pipe/p_screen.h
src/gallium/include/state_tracker/dri1_api.h
src/gallium/include/state_tracker/drm_api.h
src/gallium/tests/python/samples/tri.py
src/gallium/tests/trivial/Makefile
src/gallium/tests/unit/Makefile
src/gallium/tests/unit/SConscript
src/gallium/tests/unit/u_format_test.c
src/gallium/winsys/nouveau/drm/nouveau_drm_api.c
Diffstat (limited to 'src/gallium/drivers/trace/tr_state.c')
-rw-r--r-- | src/gallium/drivers/trace/tr_state.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/gallium/drivers/trace/tr_state.c b/src/gallium/drivers/trace/tr_state.c deleted file mode 100644 index d8c11640bf3..00000000000 --- a/src/gallium/drivers/trace/tr_state.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "tr_state.h" - -#include "util/u_memory.h" -#include "util/u_simple_list.h" - -#include "tgsi/tgsi_parse.h" - -struct trace_shader * trace_shader_create(struct trace_context *tr_ctx, - const struct pipe_shader_state *state, - void *result, - enum trace_shader_type type) -{ - struct trace_shader *tr_shdr = CALLOC_STRUCT(trace_shader); - - tr_shdr->state = result; - tr_shdr->type = type; - tr_shdr->tokens = tgsi_dup_tokens(state->tokens); - - /* works on context as well */ - trace_screen_add_to_list(tr_ctx, shaders, tr_shdr); - - return tr_shdr; -} - -void trace_shader_destroy(struct trace_context *tr_ctx, - struct trace_shader *tr_shdr) -{ - trace_screen_remove_from_list(tr_ctx, shaders, tr_shdr); - - if (tr_shdr->replaced) { - if (tr_shdr->type == TRACE_SHADER_FRAGMENT) - tr_ctx->pipe->delete_fs_state(tr_ctx->pipe, tr_shdr->replaced); - else if (tr_shdr->type == TRACE_SHADER_VERTEX) - tr_ctx->pipe->delete_vs_state(tr_ctx->pipe, tr_shdr->replaced); - else - assert(0); - } - - FREE(tr_shdr->replaced_tokens); - FREE(tr_shdr->tokens); - FREE(tr_shdr); -} |