Ian Elliott [Thu, 26 Feb 2015 00:34:46 +0000 (17:34 -0700)]
Win: layers (draw_state.c): Fix compilation error on Windows.
Visual Studio doesn't like:
static const uint32_t NUM_COLORS = 7;
char* edgeColors[NUM_COLORS];
Instead, we need to do:
char* edgeColors[NUM_COLORS];
Courtney Goeltzenleuchter [Wed, 25 Feb 2015 23:58:34 +0000 (16:58 -0700)]
layers: Track WsiCreatePresentableImage image object
The memory returned by WsiGetPresentableImage is unique
and cannot be freed or unbound by the app. Thus only object tracker
only needs to track the image object.
Courtney Goeltzenleuchter [Thu, 26 Feb 2015 00:13:27 +0000 (17:13 -0700)]
layers: Do not track PHYSICAL_GPUS
The application does not create PHYSICAL_GPU objects
so do not track them.
Courtney Goeltzenleuchter [Thu, 26 Feb 2015 00:12:26 +0000 (17:12 -0700)]
layers: Do not track Queue objects
Queue objects are not created by an application and
thus never destroyed. Thus do not need to track.
Courtney Goeltzenleuchter [Wed, 25 Feb 2015 23:56:00 +0000 (16:56 -0700)]
layers: flush logged output so it's visible immediately
Courtney Goeltzenleuchter [Wed, 25 Feb 2015 23:55:23 +0000 (16:55 -0700)]
demos: Clean up objects after cmd buf built
Courtney Goeltzenleuchter [Wed, 25 Feb 2015 22:13:35 +0000 (15:13 -0700)]
demos: Update to single layout
Courtney Goeltzenleuchter [Wed, 25 Feb 2015 20:54:22 +0000 (13:54 -0700)]
intel: use buffer type memory for linear formats
To behave in a similar fashion to other IHVs we need
to return XGL_MEMORY_TYPE_BUFFER for images that
use format_class of LINEAR and XGL_MEMORY_TYPE_IMAGE for
all other format classes.
Courtney Goeltzenleuchter [Wed, 25 Feb 2015 19:49:04 +0000 (12:49 -0700)]
demos: Be sure to initialize pNext
Courtney Goeltzenleuchter [Wed, 25 Feb 2015 19:48:19 +0000 (12:48 -0700)]
demos: Bug fix: Unbind image object
Courtney Goeltzenleuchter [Wed, 25 Feb 2015 18:48:28 +0000 (11:48 -0700)]
demos: Be sure to request correct memory type
Courtney Goeltzenleuchter [Wed, 25 Feb 2015 18:46:58 +0000 (11:46 -0700)]
demos: Add use_staging option
Specifying --use_staging as a command line argument to tri
will force tri to upload the texture via a linear mapped staging buffer.
Courtney Goeltzenleuchter [Tue, 17 Feb 2015 19:54:31 +0000 (12:54 -0700)]
cube: Use staging buffer for texture upload
Courtney Goeltzenleuchter [Sat, 14 Feb 2015 01:20:24 +0000 (18:20 -0700)]
demos: Integrate feedback from NVIDIA
Courtney Goeltzenleuchter [Sat, 14 Feb 2015 00:52:46 +0000 (17:52 -0700)]
demos: Refactor to simplify and optimize
Will now check if texturing is supported on linear, CPU accessible
textures. If so, just uses that. If not, will use a staging buffer
to copy to optimized layout texture image.
Courtney Goeltzenleuchter [Wed, 25 Feb 2015 18:01:35 +0000 (11:01 -0700)]
intel: linear images require buffer type memory
Jon Ashburn [Wed, 25 Feb 2015 19:45:23 +0000 (12:45 -0700)]
layers: Check for NULL pointer with dynamic_display()
Jon Ashburn [Wed, 25 Feb 2015 20:51:07 +0000 (13:51 -0700)]
glave: Fix locking of mem_info entries in UnmapMemory
The retruned entry pointer could change after lock released in the case the mem info list was realloc.
Tobin Ehlis [Wed, 25 Feb 2015 23:34:54 +0000 (16:34 -0700)]
layers: Fix DrawState buffer over-run when clearing descriptors
Tobin Ehlis [Wed, 25 Feb 2015 22:01:21 +0000 (15:01 -0700)]
layers: Drawstate color descriptor edges and correctly clear slot mappings
Mark Lobodzinski [Wed, 25 Feb 2015 18:23:20 +0000 (12:23 -0600)]
layers: Fix layer config file options
Needed to end up with enums here, added this option.
Mark Lobodzinski [Wed, 25 Feb 2015 18:16:04 +0000 (12:16 -0600)]
layers: Validation check for CPU_VISIBLE bit set on MapMemory calls
Tobin Ehlis [Wed, 25 Feb 2015 18:46:39 +0000 (11:46 -0700)]
layers: Fix uninitialized variable in DrawState.
Chia-I Wu [Wed, 25 Feb 2015 18:52:31 +0000 (11:52 -0700)]
update BUILD.md for imported libdrm
Two new dependencies introduced by libdrm: libpciaccess-dev and
libpthread-stubs0-dev.
Tobin Ehlis [Wed, 25 Feb 2015 18:30:27 +0000 (11:30 -0700)]
glave: For color array params, correctly size trace buffer based on array type and size
Chia-I Wu [Tue, 24 Feb 2015 17:06:26 +0000 (10:06 -0700)]
intel: use unlimited VMA cache
With the switch to non-GTT mapping, we should have enough address space for
unlimited VMA caching.
Chia-I Wu [Wed, 25 Feb 2015 16:47:30 +0000 (09:47 -0700)]
intel: use intel_bo_map_async() for xglMapMemory()
When the mappable aperture is near full, BOs mapped by
intel_bo_map_gtt_async() will need to evict something in their page fault
routine, creating unpredictable latencies. It also appears that the page
fault routine waits for the BOs to be unbusy, against the idea of
GL_MAP_UNSYNCHRONIZED_BIT.
Chia-I Wu [Wed, 25 Feb 2015 16:47:10 +0000 (09:47 -0700)]
intel: add intel_bo_map_async()
Non-blocking version of intel_bo_map().
Chia-I Wu [Wed, 25 Feb 2015 07:11:38 +0000 (15:11 +0800)]
cmake: remove unused FindDRM.cmake
Chia-I Wu [Wed, 25 Feb 2015 04:45:34 +0000 (12:45 +0800)]
intel: add and link with libintelkmd.a
Add cmake rules to build libintelkmd.a, which implements our KMD interface
using our own stripped-down libdrm. This removes libdrm dependency.
Chia-I Wu [Wed, 25 Feb 2015 04:33:17 +0000 (12:33 +0800)]
intel: import stripped-down libdrm-2.4.59-23-g1f73578
Add selected files from libdrm, unmodified.
Chia-I Wu [Wed, 25 Feb 2015 07:09:39 +0000 (15:09 +0800)]
intel: remove libdrm dependency from libintelcompiler.a
We should not need libdrm in the compiler.
Peter Lohrmann [Tue, 24 Feb 2015 20:31:20 +0000 (12:31 -0800)]
glvdebug_xgl: String replace of xgl to vk and XGL to VK for purposes of the GDC demo.
* The most recent headers will use the vk prefix, and then the generated xgl code will automatically output the correct packet strings.
* However, the header version we're using for the GDC demo doesn't have that prefix yet, so we're doing the switch in the UI temporarily.
Cody Northrop [Tue, 24 Feb 2015 21:15:29 +0000 (14:15 -0700)]
compiler: Start using SIMD16 fragment shaders
The SIMD16 ISA has always been available, we just hadn't hooked it
up yet in the driver. We've got enough workloads to know if it helps
performance now, so flip the switch!
Chia-I Wu [Mon, 23 Feb 2015 17:41:08 +0000 (10:41 -0700)]
demos/cube: use a single layout
Courtney Goeltzenleuchter [Thu, 12 Feb 2015 01:17:22 +0000 (18:17 -0700)]
demos: Updated tri to use staging buffer for texture
Courtney Goeltzenleuchter [Tue, 17 Feb 2015 16:48:44 +0000 (09:48 -0700)]
cube: Fix leaking resources
Demo was leaking Framebuffers and RenderPasses every time a new command
buffer was created (every frame). Now app creates only two command
buffers (one for each render target) and re-uses those command buffers
to draw the cube.
Tobin Ehlis [Tue, 24 Feb 2015 22:40:22 +0000 (15:40 -0700)]
layers: Add simple Cmd Buffer dot file dump to DrawState
Tobin Ehlis [Tue, 24 Feb 2015 22:39:04 +0000 (15:39 -0700)]
layers: For ParamChecker, verify struct ptrs aren't NULL before validating
Mark Lobodzinski [Tue, 24 Feb 2015 22:20:24 +0000 (16:20 -0600)]
layers: Remove destroyed/freed objects from both object lists
Some objects, upon being freed or destroyed, were removed from the
object-specific linked list but not from the master object list.
Jeremy Hayes [Fri, 20 Feb 2015 22:17:08 +0000 (15:17 -0700)]
glvdebug: Enable/disable draw state widget.
Enable/disable the draw state widget instead of adding/removing the tab
containing the draw state. Display an empty scene when the widget is
disabled because disabled tabs are still visible.
Peter Lohrmann [Fri, 20 Feb 2015 20:36:31 +0000 (12:36 -0800)]
glvdebug: ReplayWorker now properly cleans up the "Play to Here" action.
* This was being leaked before, and was resulting in multiple "Play to Here" context menu items in the API Call tree.
Peter Lohrmann [Fri, 20 Feb 2015 20:24:20 +0000 (12:24 -0800)]
glvdebug: Resize text and items on Timeline.
* The Thread ID text is now drawn at 30% of the thread's area, but is cap'd at the default font height.
* The timeline items are now drawn at 40% of the thread's area, to ensure that it never overlaps the Thread Id text.
Peter Lohrmann [Fri, 20 Feb 2015 19:17:00 +0000 (11:17 -0800)]
glvdebug: Close currently open trace files before trying to open a new one.
* Previously, If the user used File->Open to open a new trace file, the currently open trace file would not be closed. This was resulting in multiple Replayer tabs being visible in the UI (and likely a bunch of other less noticeable issues).
* Attempting to close the trace file prior to opening a new one seems the best way to resolve this issue.
Peter Lohrmann [Fri, 20 Feb 2015 18:10:25 +0000 (10:10 -0800)]
glvdebug: ThreadIds are uint32_t, not int.
* This was causing some thread ids to be printed in the timeline as negative.
Peter Lohrmann [Thu, 19 Feb 2015 23:51:41 +0000 (15:51 -0800)]
glvdebug: Timeline now resizes properly when the window is resized.
* The zoom factor and horizontal scrollbar was not being updated correctly.
Peter Lohrmann [Thu, 19 Feb 2015 18:05:54 +0000 (10:05 -0800)]
glvdebug_xgl: Remove pipeline_dump files in more places.
* Files are now deleted when the trace file is loaded, and when the replay is started or continued. This ensure that stale images are left on disk.
* Also make the file removing code portable by using QFile::Remove(..).
Jeremy Hayes [Thu, 19 Feb 2015 16:24:46 +0000 (09:24 -0700)]
glvdebug: Add option for separate replay window.
Jon Ashburn [Tue, 17 Feb 2015 20:29:09 +0000 (13:29 -0700)]
layers: Remove the automatic dumping of DOT files.
This is now controlled solely by the app calling drawStateDumpDOTFile()
Conflicts:
layers/draw_state.c
Jon Ashburn [Tue, 17 Feb 2015 20:28:11 +0000 (13:28 -0700)]
glave: Add Dump() to debugger so DrawState dumping can occur on pauses
Conflicts:
glave-generate.py
Peter Lohrmann [Thu, 12 Feb 2015 23:47:04 +0000 (15:47 -0800)]
glvdebug: minor improvement to timeline so it doesn't try to scrollTo(..) invalid items.
* This would cause the timeline to redraw thinking that the item wasn't in view.
Peter Lohrmann [Thu, 12 Feb 2015 23:45:45 +0000 (15:45 -0800)]
glvdebug: Fix highlighting API call in call tree when replayer is paused and a proxyModel is being used.
* There was inconsistency in which model was being used to get the QModelIndex, which caused nothing to be highlighted in the API call tree.
Peter Lohrmann [Thu, 12 Feb 2015 20:56:10 +0000 (12:56 -0800)]
glvdebug: Remove functions and buttons related to snapshots from the main UI.
* They were previously hidden by default, but to clean up the code, I decided to remove them completely.
Jeremy Hayes [Thu, 12 Feb 2015 23:15:58 +0000 (16:15 -0700)]
glvdebug: Use svg instead of png.
Conflicts:
layers/draw_state.c
Conflicts:
layers/draw_state.c
Jeremy Hayes [Thu, 12 Feb 2015 23:07:04 +0000 (16:07 -0700)]
glvdebug: Clean up pipeline dumps on trace load.
Jeremy Hayes [Thu, 12 Feb 2015 22:52:10 +0000 (15:52 -0700)]
glvdebug: Fixed label for draw state diagram.
Jeremy Hayes [Thu, 12 Feb 2015 18:19:17 +0000 (11:19 -0700)]
glvdebug: Use SVG renderer for draw state diagram.
Courtney Goeltzenleuchter [Wed, 18 Feb 2015 18:40:27 +0000 (11:40 -0700)]
intel: Return proper structure size for buffer object
Tobin Ehlis [Tue, 24 Feb 2015 16:16:47 +0000 (09:16 -0700)]
layers: Add DrawState dot file output of descriptor details
Mark Lobodzinski [Fri, 20 Feb 2015 22:38:40 +0000 (16:38 -0600)]
layers: Fix buffer overrun in memtracker
Long function name+64-bit pointer caused buffer overrun in rendersystemtest
Courtney Goeltzenleuchter [Tue, 24 Feb 2015 00:40:15 +0000 (17:40 -0700)]
misc: Use XGL_API_VERSION instead of hard coded value
Ian Elliott [Tue, 24 Feb 2015 00:10:06 +0000 (17:10 -0700)]
tri: Change from having a hard-coded API version to using the latest.
Piers actually found and fixed this, but I wanted to get it on "master" without
waiting for the rest of his changes.
Tobin Ehlis [Mon, 23 Feb 2015 23:09:58 +0000 (16:09 -0700)]
layers: In DrawState correctly clear update chain for Struct Node
Tobin Ehlis [Mon, 23 Feb 2015 21:09:16 +0000 (14:09 -0700)]
layers: Lock ObjectTracker linked-list access
Tobin Ehlis [Mon, 23 Feb 2015 16:06:28 +0000 (09:06 -0700)]
layers: Add per-thread tracking of latest cmd buffer
Tobin Ehlis [Fri, 20 Feb 2015 19:05:30 +0000 (12:05 -0700)]
layers: Don't run ObjectTracker checks on NULL mem objects
Jon Ashburn [Mon, 23 Feb 2015 18:07:30 +0000 (11:07 -0700)]
glave: Don't log error if replay is succesful but trace was not_ready
Jon Ashburn [Mon, 23 Feb 2015 17:37:46 +0000 (10:37 -0700)]
glave: Add lock around the socket send()
The send() is not atomic as less than full buffer can be sent. Need to lock
for multithreaded apps.
Cody Northrop [Fri, 30 Jan 2015 17:42:23 +0000 (10:42 -0700)]
compiler: Add a mutex for shader creation
Wrap the contents of shader_create_ir with a mutex to allow
multiple threads to issue xglCreateShader calls.
Most of this path is thread safe, we just need to rethink
how some initialization is happening, calls that used to live
on a single thread.
Jon Ashburn [Fri, 20 Feb 2015 21:48:27 +0000 (14:48 -0700)]
glave: Fix search of mem_info list on UnmapMemory during tracing
Jon Ashburn [Fri, 20 Feb 2015 20:10:52 +0000 (13:10 -0700)]
glave: Improve logging for anomalous conditions around Map and Unmap memory
Jon Ashburn [Fri, 20 Feb 2015 00:04:06 +0000 (17:04 -0700)]
glave: Lock around access to the global mem_info list
Cody Northrop [Fri, 20 Feb 2015 18:22:34 +0000 (11:22 -0700)]
compiler: Fix string use after delete in translator
Don't use a string that was only allocated for the scope of an if.
Instead, allocate the string at loop scope, and allow it to
deconstruct after use.
Courtesy of -fsanitize=address.
Also fix one other potentially unsafe string reference.
Cody Northrop [Fri, 20 Feb 2015 16:45:48 +0000 (09:45 -0700)]
compiler: Fail pipeline creation if shader uses global uniforms
If the shader reads a global, non-block uniform, XGL does
not know where to read the value from. Rather than segfault,
log an error, set an error code, and exit. There is probably
someplace higher in the stack that should catch this.
Jon Ashburn [Fri, 20 Feb 2015 17:30:32 +0000 (10:30 -0700)]
glave: Fix bug in tracing CreateRenderPass with NULL attachments
Tobin Ehlis [Fri, 20 Feb 2015 16:30:06 +0000 (09:30 -0700)]
layers: Multi-threading fixes for DrawState
Tobin Ehlis [Thu, 19 Feb 2015 22:26:49 +0000 (15:26 -0700)]
layers: Disable DrawState dot file autodump and an incorrect validation check
Tobin Ehlis [Thu, 19 Feb 2015 20:14:59 +0000 (13:14 -0700)]
layers: Fix DrawState bug to correctly shadow image/update structs
Chia-I Wu [Thu, 19 Feb 2015 18:20:38 +0000 (11:20 -0700)]
intel: enable HiZ on Gen7+
The support is restricted to Gen7+. To support HiZ on Gen6, we need to
perform manual combined/separated stencil resolves and that may hurt the
performance instead.
Also, we do not support fast depth clears. xglSetFastClearDepth() will be
removed in a later xgl.h revision.
Chia-I Wu [Thu, 19 Feb 2015 18:17:45 +0000 (11:17 -0700)]
intel: add cmd_meta_ds_op()
It can perform fast depth clear, depth resolve, and hiz resolve. There is a
TODO about fast depth clear.
With our current xgl.h revision, I have to assume a layout in
xglCmdClearDepthStencil(). It will get fixed when we are at revision 59.
Alternatively, I could also assume the worst case and always do a depth
resolve after clearing, but that may hurt the performance.
In other words, it is invalid to use XGL_IMAGE_LAYOUT_GENERAL for shadow
textures.
Chia-I Wu [Thu, 19 Feb 2015 18:08:25 +0000 (11:08 -0700)]
intel: make sense of gen6_meta_DEPTH_STENCIL_STATE()
When operating on DEPTH, enable only depth write. When operating on STENCIL,
enable only stencil test and stencil write for both faces. The old code
should supposedly work, but it is hard to reason about it.
Chia-I Wu [Wed, 18 Feb 2015 19:21:22 +0000 (12:21 -0700)]
intel: avoid unnecessary stencil and hiz relocs
When the depth/stencil view does not need a separate stencil buffer or a hiz
buffer, do not set up relocs for them.
Chia-I Wu [Thu, 19 Feb 2015 20:18:42 +0000 (13:18 -0700)]
intel: add intel_format_has_depth()
Replace intel_format_is_depth() by intel_format_has_depth().
Chia-I Wu [Thu, 19 Feb 2015 20:54:35 +0000 (13:54 -0700)]
intel: remove intel_format_is_stencil()
It is not needed since the update to XGL_FORMAT by
2b7e88a1fdefc49d78e80765745e87e00034c2a0.
Jon Ashburn [Wed, 18 Feb 2015 18:29:58 +0000 (11:29 -0700)]
loader: Fix merge of layer names from env and CreateDevice
Ian Elliott [Thu, 19 Feb 2015 22:49:03 +0000 (15:49 -0700)]
loader: initialize result for xglCreateInstance().
Ian Elliott [Thu, 19 Feb 2015 21:04:56 +0000 (14:04 -0700)]
nulldrv: Return proper structure size for buffer object
This defect was cloned from the Intel driver; and so it gets the same fix:-).
Chia-I Wu [Wed, 18 Feb 2015 22:47:12 +0000 (15:47 -0700)]
intel: ICD_EXPORT all API functions
Chia-I Wu [Wed, 18 Feb 2015 22:37:27 +0000 (15:37 -0700)]
intel: format API functions as declared in xgl.h
Chia-I Wu [Wed, 18 Feb 2015 22:54:05 +0000 (15:54 -0700)]
intel: rename cmd_prepare.c to cmd_barrier.c
Chia-I Wu [Wed, 18 Feb 2015 22:32:06 +0000 (15:32 -0700)]
intel: minor improvements to fb.c
Less surprises when the applications do things we do not support.
Chia-I Wu [Tue, 17 Feb 2015 23:44:37 +0000 (16:44 -0700)]
Revert "intel: Be sure to set width & height for depth-only"
This reverts commit
da71cc37e5ab9720cc073ac5a40866ded83cb760. The
width and height are always set to default values since
71fcc2dae2f302fd2e52836b4098b233762d56f8.
Chia-I Wu [Wed, 18 Feb 2015 22:21:38 +0000 (15:21 -0700)]
intel: mostly cosmetic changes to fb.[ch]
Chia-I Wu [Wed, 18 Feb 2015 21:59:11 +0000 (14:59 -0700)]
intel: do not cast away constness in intel_cmd_begin()
Chia-I Wu [Wed, 18 Feb 2015 21:51:59 +0000 (14:51 -0700)]
intel: move xglCmd{Begin,End}RenderPass to cmd_pipeline.c
All xglCmd*() functions should be defined in cmd*.c.
Chia-I Wu [Wed, 18 Feb 2015 21:48:21 +0000 (14:48 -0700)]
intel: rename intel_rp_from_obj() to intel_render_pass_from_obj()
For consistency.
Chia-I Wu [Wed, 18 Feb 2015 21:46:55 +0000 (14:46 -0700)]
intel: rename intel_framebuffer to intel_fb
For consistency.
Tobin Ehlis [Thu, 19 Feb 2015 16:55:18 +0000 (09:55 -0700)]
layers: DrawState bug fixes
Correctly track UpdateChain per Set and free the shadowNode
Fix pTypes array to correctly track update types per descriptor
Fix upperBound code to correctly loop over all elements of layout
Various NULL ptr checks
Mark Lobodzinski [Thu, 19 Feb 2015 00:06:24 +0000 (18:06 -0600)]
layers: Fix memtracker reporting related to freeing presentable image memory
Output an error if presentable image memory is explicitly freed, and avoid
warnings if it is not.
Chia-I Wu [Wed, 18 Feb 2015 21:39:54 +0000 (14:39 -0700)]
loader: do not set RTLD_DEEPBIND
Instead, build layers with -Bsymbolic. This should fix (or hide) a reported
crash with overriden malloc()/free().