mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
debug functions
This commit is contained in:
parent
376fb1c23e
commit
958c92e0c7
2 changed files with 96 additions and 0 deletions
60
src/mesa/state_tracker/st_debug.c
Normal file
60
src/mesa/state_tracker/st_debug.c
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* 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 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 TUNGSTEN GRAPHICS AND/OR ITS 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 "main/context.h"
|
||||
#include "shader/prog_print.h"
|
||||
|
||||
#include "pipe/p_state.h"
|
||||
#include "pipe/tgsi/exec/tgsi_core.h"
|
||||
|
||||
#include "pipe/cso_cache/cso_cache.h"
|
||||
|
||||
#include "st_context.h"
|
||||
#include "st_debug.h"
|
||||
#include "st_program.h"
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Print current state. May be called from inside gdb to see currently
|
||||
* bound vertex/fragment shaders and associated constants.
|
||||
*/
|
||||
void
|
||||
st_print_current(void)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct st_context *st = ctx->st;
|
||||
|
||||
tgsi_dump( st->state.vs->state.tokens, 0 );
|
||||
if (st->vp->Base.Base.Parameters)
|
||||
_mesa_print_parameter_list(st->vp->Base.Base.Parameters);
|
||||
|
||||
tgsi_dump( st->state.fs->state.tokens, 0 );
|
||||
if (st->fp->Base.Base.Parameters)
|
||||
_mesa_print_parameter_list(st->fp->Base.Base.Parameters);
|
||||
}
|
||||
36
src/mesa/state_tracker/st_debug.h
Normal file
36
src/mesa/state_tracker/st_debug.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
|
||||
* 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 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 TUNGSTEN GRAPHICS AND/OR ITS 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.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
||||
#ifndef ST_DEBUG_H
|
||||
#define ST_DEBUG_H
|
||||
|
||||
extern void
|
||||
st_print_current(void);
|
||||
|
||||
|
||||
#endif /* ST_DEBUG_H */
|
||||
Loading…
Add table
Reference in a new issue