21 Commits

Author SHA1 Message Date
Thomas Wood
36b8143c22 Add missing noreturn attribute to various functions
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11 14:20:55 +00:00
Micah Fedke
c81d293aed convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocci
Apply the new API to all call sites within the test suite using the following
semantic patch:

// Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls
@@
identifier i =~ "\bdrm_open_any\b";
@@
- i()
+ drm_open_driver(DRIVER_INTEL)

@@
identifier i =~ "\bdrm_open_any_master\b";
@@
- i()
+ drm_open_driver_master(DRIVER_INTEL)

@@
identifier i =~ "\bdrm_open_any_render\b";
@@
- i()
+ drm_open_driver_render(DRIVER_INTEL)

@@
identifier i =~ "\b__drm_open_any\b";
@@
- i()
+ __drm_open_driver(DRIVER_INTEL)

Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Thomas Wood
1dcace3018 build: fix unused-result warnings
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:15:16 +01:00
Yunlian Jiang
95019c2a3c debugger: remove unnecessary struct per_thread_data
This removes unnecessary 'struct per_thread_data' and avoids the
compilation error 'variable length array in structure extension
will never be supported' by clang. The bug entry is
https://code.google.com/p/chromium/issues/detail?id=476001

Cc: Benjamin Widawsky <benjamin.widawsky@intel.com>
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Yunlian Jiang <yunlian@google.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-05-27 16:28:34 +01:00
Thomas Wood
277ca2b992 lib: print a stack trace when a test assertion fails
Add an optional dependency on libunwind to print stack traces when a
test assertion fails.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-26 15:50:05 +00:00
Rémi Cardona
2ef19ad79a shader-debugger: Force file/stdout IO as UTF-8
Not all locales on linux are UTF-8, the most notable being the C locale.
Python will use the ASCII codec for stream IO in this case and will barf
on the Copyright sign at the top of .g4a files.

Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=519434
Signed-off-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-08-27 08:56:08 +01:00
Daniel Vetter
c03c6ceb29 lib: rename intel_gpu_tools.h to intel_io.h
With the header cleanup we can now give this header a suitable name,
since it now really only contains register access and other I/O
functions and assorted definitions.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 21:34:29 +01:00
Daniel Vetter
6cfcd71589 lib: remove uncessary #includes from headers
Only include what the header itself needs. The big fish here is
intel-gpu-tools.h. More will follow.

One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one
of which was broken.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-22 20:08:13 +01:00
Thomas Wood
49aa4b0df5 debugger: fix the -p option
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-11 14:35:09 +01:00
Daniel Vetter
ae57cd7dc7 debugger: avoid global variable shadowing
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-19 22:11:47 +01:00
Ben Widawsky
94b2b861f5 shader-debugger: Use in tree gen4asm
Reported-by: Patrick McMunn <doctorwhoguy@gmail.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-20 21:15:16 -08:00
Damien Lespiau
2797596432 build: Fix automake 1.13 warnings
warning: deprecated feature: target 'sr' overrides 'sr$(EXEEXT)'

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-07-19 18:38:34 +01:00
Damien Lespiau
af7e11de69 build: Add CAIRO_FLAGS to the debugger compilation
The library in lib/ exposes <cairo.h> in its main header and thus users
must be able to include it.
2013-03-04 15:54:35 +00:00
Daniel Vetter
662d732199 lib: extract kmstest_create_fb
We should get more kms tests soon, and not needing to copy-paste a
nice test pattern should be useful.

That establishes a firm depency of i-g-t on cairo over everything, but
I don't care so much about that.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-22 15:56:29 +02:00
Gaetan Nadon
4768adf7d7 Debugger: convert existing makefiles to Automake.
A common xorg idiom is used. The dependencies are auto-detected.
If they are present, the debugger is build.
If any are missing, the debugger is silently skipped.
If --enable-shader-debugger is specified, the configuration
will abort if any of the dependencies is missing.
No user actions is needed, no env variable to set (as it should be)

This will fix a number of problems:
build cannot start due Makefile missing in tarball.
build fails as GEN4ASM variable not available in Makefile.
distcheck is also disturbed.

In the process other minor problems were fixed:
helper target is missing dependencies on evict.h.
too may arguments given to pre_cpp.py but they were ignored.
fills /tmp with temporary files.

Acked-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2012-01-12 09:13:08 -05:00
Gaetan Nadon
665b86664a config: use project wide xorg warnings variable
Use CWARNFLAGS as in all of xorg. There seems to be no reason why this
module should be different. The warnings were updated recently
for those who install the latest util-macros.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-04 10:47:11 +01:00
Gaetan Nadon
6540ed2112 Use standard .gitignore file and layout
Reusing xorg code saves maintenance in the long term.

Now that m4/.gitignore is removed, the -I m4 ${ACLOCAL_FLAGS}
must be removed to avoid build breakage as m4 is generated and not
part of the git source.

Acked-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-01-04 10:47:10 +01:00
Ben Widawsky
7c8d41f4d9 i-g-t/debugger - make the debugger work with distcheck
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2011-10-31 17:34:16 -07:00
Ben Widawsky
15830ea54b i-g-t/debugger: Only allow the shader debugger if the user has specified a gen4asm
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2011-10-31 17:34:16 -07:00
Ben Widawsky
a5abe17746 intel: we don't do distcheck for the debugger 2011-09-13 08:55:01 -07:00
Ben Widawsky
62873796c4 intel-gpu-tools/debugging: shader debugger
high level summary of the files:
  * debug_rdata - get current state from debug registers. Helpful
    when developing the debugger, and could serve some purpose in the
    future.
  * eudb - the debugger itself
  * eviction_macro - generate the proper macro to flush the EU render
    cache until I get control flow working
  * pre_cpp - an evaluating c preprocesser like thing, to be used before
    cpp
  * sr - the system routine, exception handler which runs on the EU
  * test - a very basic test system routine
  * debug.h
2011-07-28 14:26:57 -07:00