2013-07-08 03:02:56 +01:00
|
|
|
/*
|
s/Tungsten Graphics/VMware/
Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the
old copyright name is creating unnecessary confusion, hence this change.
This was the sed script I used:
$ cat tg2vmw.sed
# Run as:
#
# git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed
#
# Rename copyrights
s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g
/Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./
s/TUNGSTEN GRAPHICS/VMWARE/g
# Rename emails
s/alanh@tungstengraphics.com/alanh@vmware.com/
s/jens@tungstengraphics.com/jowen@vmware.com/g
s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g
s/keithw\?@tungstengraphics.com/keithw@vmware.com/g
s/michel@tungstengraphics.com/daenzer@vmware.com/g
s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
s/zack@tungstengraphics.com/zackr@vmware.com/
# Remove dead links
s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g
# C string src/gallium/state_trackers/vega/api_misc.c
s/"Tungsten Graphics, Inc"/"VMware, Inc"/
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-17 16:27:50 +00:00
|
|
|
* Copyright 2003 VMware, Inc.
|
2013-07-08 03:02:56 +01:00
|
|
|
* Copyright © 2006 Intel Corporation
|
|
|
|
*
|
|
|
|
* 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, sublicense,
|
|
|
|
* 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 NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2017-03-01 19:20:25 +00:00
|
|
|
* \file gen_debug.c
|
2013-07-08 03:02:56 +01:00
|
|
|
*
|
|
|
|
* Support for the INTEL_DEBUG environment variable, along with other
|
|
|
|
* miscellaneous debugging code.
|
|
|
|
*/
|
|
|
|
|
2017-03-01 19:20:25 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "common/gen_debug.h"
|
|
|
|
#include "util/macros.h"
|
2015-10-05 22:13:29 +01:00
|
|
|
#include "util/debug.h"
|
2017-03-05 21:23:25 +00:00
|
|
|
#include "c11/threads.h"
|
2013-07-08 03:02:56 +01:00
|
|
|
|
2014-04-12 06:27:31 +01:00
|
|
|
uint64_t INTEL_DEBUG = 0;
|
2013-07-08 03:02:56 +01:00
|
|
|
|
2015-10-05 22:13:29 +01:00
|
|
|
static const struct debug_control debug_control[] = {
|
2014-09-24 00:15:22 +01:00
|
|
|
{ "tex", DEBUG_TEXTURE},
|
|
|
|
{ "state", DEBUG_STATE},
|
|
|
|
{ "blit", DEBUG_BLIT},
|
|
|
|
{ "mip", DEBUG_MIPTREE},
|
|
|
|
{ "fall", DEBUG_PERF},
|
|
|
|
{ "perf", DEBUG_PERF},
|
|
|
|
{ "perfmon", DEBUG_PERFMON},
|
|
|
|
{ "bat", DEBUG_BATCH},
|
|
|
|
{ "pix", DEBUG_PIXEL},
|
|
|
|
{ "buf", DEBUG_BUFMGR},
|
|
|
|
{ "fbo", DEBUG_FBO},
|
|
|
|
{ "fs", DEBUG_WM },
|
|
|
|
{ "gs", DEBUG_GS},
|
|
|
|
{ "sync", DEBUG_SYNC},
|
|
|
|
{ "prim", DEBUG_PRIMS },
|
|
|
|
{ "vert", DEBUG_VERTS },
|
|
|
|
{ "dri", DEBUG_DRI },
|
|
|
|
{ "sf", DEBUG_SF },
|
2017-09-05 23:46:30 +01:00
|
|
|
{ "submit", DEBUG_SUBMIT },
|
2014-09-24 00:15:22 +01:00
|
|
|
{ "wm", DEBUG_WM },
|
|
|
|
{ "urb", DEBUG_URB },
|
|
|
|
{ "vs", DEBUG_VS },
|
|
|
|
{ "clip", DEBUG_CLIP },
|
2013-07-08 03:02:56 +01:00
|
|
|
{ "shader_time", DEBUG_SHADER_TIME },
|
2014-09-24 00:15:22 +01:00
|
|
|
{ "no16", DEBUG_NO16 },
|
|
|
|
{ "blorp", DEBUG_BLORP },
|
|
|
|
{ "nodualobj", DEBUG_NO_DUAL_OBJECT_GS },
|
|
|
|
{ "optimizer", DEBUG_OPTIMIZER },
|
2014-11-13 18:40:01 +00:00
|
|
|
{ "ann", DEBUG_ANNOTATION },
|
2014-09-24 00:15:22 +01:00
|
|
|
{ "no8", DEBUG_NO8 },
|
2017-08-29 10:41:27 +01:00
|
|
|
{ "no-oaconfig", DEBUG_NO_OACONFIG },
|
2015-07-23 10:11:53 +01:00
|
|
|
{ "spill_fs", DEBUG_SPILL_FS },
|
|
|
|
{ "spill_vec4", DEBUG_SPILL_VEC4 },
|
2014-01-11 05:39:25 +00:00
|
|
|
{ "cs", DEBUG_CS },
|
2015-10-26 02:05:56 +00:00
|
|
|
{ "hex", DEBUG_HEX },
|
2015-10-29 23:08:45 +00:00
|
|
|
{ "nocompact", DEBUG_NO_COMPACTION },
|
2015-07-26 03:28:59 +01:00
|
|
|
{ "hs", DEBUG_TCS },
|
|
|
|
{ "tcs", DEBUG_TCS },
|
|
|
|
{ "ds", DEBUG_TES },
|
|
|
|
{ "tes", DEBUG_TES },
|
2015-09-05 13:05:48 +01:00
|
|
|
{ "l3", DEBUG_L3 },
|
2016-05-27 05:28:45 +01:00
|
|
|
{ "do32", DEBUG_DO32 },
|
2016-05-31 14:47:50 +01:00
|
|
|
{ "norbc", DEBUG_NO_RBC },
|
2017-03-13 21:23:34 +00:00
|
|
|
{ "nohiz", DEBUG_NO_HIZ },
|
2017-03-20 08:58:48 +00:00
|
|
|
{ "color", DEBUG_COLOR },
|
2017-09-16 01:47:07 +01:00
|
|
|
{ "reemit", DEBUG_REEMIT },
|
2019-03-03 16:10:46 +00:00
|
|
|
{ "soft64", DEBUG_SOFT64 },
|
2013-07-08 03:02:56 +01:00
|
|
|
{ NULL, 0 }
|
|
|
|
};
|
|
|
|
|
2015-02-19 01:31:29 +00:00
|
|
|
uint64_t
|
|
|
|
intel_debug_flag_for_shader_stage(gl_shader_stage stage)
|
|
|
|
{
|
2014-01-11 05:39:25 +00:00
|
|
|
uint64_t flags[] = {
|
2015-02-19 01:31:29 +00:00
|
|
|
[MESA_SHADER_VERTEX] = DEBUG_VS,
|
2015-07-26 03:28:59 +01:00
|
|
|
[MESA_SHADER_TESS_CTRL] = DEBUG_TCS,
|
|
|
|
[MESA_SHADER_TESS_EVAL] = DEBUG_TES,
|
2015-02-19 01:31:29 +00:00
|
|
|
[MESA_SHADER_GEOMETRY] = DEBUG_GS,
|
|
|
|
[MESA_SHADER_FRAGMENT] = DEBUG_WM,
|
2014-01-11 05:39:25 +00:00
|
|
|
[MESA_SHADER_COMPUTE] = DEBUG_CS,
|
2015-02-19 01:31:29 +00:00
|
|
|
};
|
2014-03-07 09:19:09 +00:00
|
|
|
STATIC_ASSERT(MESA_SHADER_STAGES == 6);
|
2015-02-19 01:31:29 +00:00
|
|
|
return flags[stage];
|
|
|
|
}
|
|
|
|
|
2017-03-05 21:23:25 +00:00
|
|
|
static void
|
|
|
|
brw_process_intel_debug_variable_once(void)
|
|
|
|
{
|
|
|
|
INTEL_DEBUG = parse_debug_string(getenv("INTEL_DEBUG"), debug_control);
|
|
|
|
}
|
|
|
|
|
2013-07-08 03:02:56 +01:00
|
|
|
void
|
2015-10-07 00:19:04 +01:00
|
|
|
brw_process_intel_debug_variable(void)
|
2013-07-08 03:02:56 +01:00
|
|
|
{
|
2017-03-05 21:23:25 +00:00
|
|
|
static once_flag process_intel_debug_variable_flag = ONCE_FLAG_INIT;
|
|
|
|
|
|
|
|
call_once(&process_intel_debug_variable_flag,
|
|
|
|
brw_process_intel_debug_variable_once);
|
2013-07-08 03:02:56 +01:00
|
|
|
}
|