platform/upstream/Vulkan-LoaderAndValidationLayers.git
9 years agoNew loader_get_registry_value() function reads 32/64 registry ...
Ian Elliott [Tue, 31 Mar 2015 21:32:41 +0000 (15:32 -0600)]
New loader_get_registry_value() function reads 32/64 registry ...

This version should be able to find a key/value if it exists in either the 32
or 64 bit hive.  Also, it also doesn't allocate any string data until it knows
what size is needed.

Changed the "xcv_nvidia.cpp" file to also use the new registry approach.

9 years agotests: Add layer_test_suite.py
Tobin Ehlis [Fri, 27 Mar 2015 17:47:10 +0000 (11:47 -0600)]
tests: Add layer_test_suite.py

Added run_all_tests_with_layers.sh script that enables layers and runs all tests
layer_test_suite.py wraps that bash script and parses output to check:
1. That layers were enabled
2. That expected layer errors occur
3. That no unexpected errors occur

9 years agoglave: add codegen'd files that come from driver's xgl_helper.py
Peter Lohrmann [Mon, 30 Mar 2015 23:45:44 +0000 (16:45 -0700)]
glave: add codegen'd files that come from driver's xgl_helper.py

* These are now confirmed to be consistent between builds.

9 years agoxgl_helper: sort dictionaries to make generated output consistent
Peter Lohrmann [Mon, 30 Mar 2015 23:29:56 +0000 (16:29 -0700)]
xgl_helper: sort dictionaries to make generated output consistent

9 years agoglave: rename codegen'd files to better reflect where they are used.
Peter Lohrmann [Fri, 27 Mar 2015 19:57:10 +0000 (12:57 -0700)]
glave: rename codegen'd files to better reflect where they are used.

* Several of the filenames started with glvtrace_* but are also used by glvreplay and glvdebug because they are related to trace packet structures, which must be shared.
* Also rename the generated files from 'xgl' to 'vk' (at least those that are related to glave. I didn't rename the once that come from the driver's scripts).
* There were a few manually written files that needed to have updated includes due to the name changes.

(cherry picked from commit 56782cd5af7f7788ce0d80524be016321c6c07f0)
(cherry picked from commit f004da6b53c1ede7452fad3ea3ba3fb4247626ba)

9 years agoglave: move code-gen'ed files.
Peter Lohrmann [Thu, 26 Mar 2015 04:35:32 +0000 (21:35 -0700)]
glave: move code-gen'ed files.

* glave-generate.py has moved into tools/glave/scripts/ and renamed to vk_generate.py
* still reference xgl.py and xgl_helper.py from GL-Next directory.
* all glave-specific code-gen'ed files now live in the source tree
* all glave-specific code-gen'ed files are now generated into a "codegen" directory local to the project to make it easier to spot when a generated file has changed or is being debugged.
* all glave-specific code-gen'ed files are now being checked in so that we can better track differences caused by the code-gen as the header file evolves.

(based on squash of the follow two cherry-picks, plus some additional changes to remove files generated by xgl_helper.py since they change every build)
(cherry picked from commit eec461f4bc68c5ac12a6b73b9f6e5464be0640bf)
(cherry picked from commit 2614252bfc3fe9c2cd8470b3b42b529a69f2e3f3)

9 years agoglave: Add ability for replay memory allocations and mapping to be pending
Jon Ashburn [Fri, 27 Mar 2015 22:23:47 +0000 (16:23 -0600)]
glave: Add ability for replay memory allocations and mapping to be pending

9 years agoglave: Consolidate the maped data and gpu memory maps used during replay
Jon Ashburn [Thu, 26 Mar 2015 22:15:18 +0000 (16:15 -0600)]
glave: Consolidate the maped data and gpu memory maps used during replay

Now the information is all within a single STL map.

9 years agoglave: Make the XGL_GPU_MEMORY object mapping use a structure. Needed so can merge...
Jon Ashburn [Tue, 24 Mar 2015 17:05:02 +0000 (11:05 -0600)]
glave: Make the XGL_GPU_MEMORY object mapping use a structure. Needed so can merge the Memory object data and info into the same mapping.

9 years agoglave: Track Buffer and Image memory requirements during replay.
Jon Ashburn [Mon, 23 Mar 2015 15:27:33 +0000 (09:27 -0600)]
glave: Track Buffer and Image memory requirements during replay.

This is start of replayer having it's own memory manager.  Needed since
trace GPU may not have same memory requirements for objects as replay GPU

9 years agolayers: Correct xglBindObjectMemory signature in MemTracker message.
Tobin Ehlis [Thu, 26 Mar 2015 14:24:16 +0000 (08:24 -0600)]
layers: Correct xglBindObjectMemory signature in MemTracker message.

9 years agotests: Cleanup some set objects and memory that were flagged by validation
Tobin Ehlis [Thu, 26 Mar 2015 14:23:25 +0000 (08:23 -0600)]
tests: Cleanup some set objects and memory that were flagged by validation

9 years agointel: fix XGL_TOPOLOGY_POINT_LIST
Chia-I Wu [Wed, 25 Mar 2015 00:47:18 +0000 (08:47 +0800)]
intel: fix XGL_TOPOLOGY_POINT_LIST

Setting "Point Sprite Texture Coordinate Enable" to 0xffffffffu does not mean
"always enable point sprites", but means "treat all attributes as
gl_PointCoord".  Fix the field to only set the bit for gl_PointCoord.

9 years agointel: remove an invalid assert
Chia-I Wu [Wed, 25 Mar 2015 00:42:45 +0000 (08:42 +0800)]
intel: remove an invalid assert

While VS outputs two attributes, VUE header and vertex position, that are
ignored by FS, FS can consume attributes that are not VS outputs, such as
gl_PointCoord.  Remove this bogus assert

  assert(vs->out_count >= fs->in_count + 2)

9 years agolayers: Migrated DrawState layer to cpp
Tobin Ehlis [Tue, 17 Mar 2015 22:24:32 +0000 (16:24 -0600)]
layers: Migrated DrawState layer to cpp

Move almost all linked-lists to unordered_maps and vectors.
Clean up malloc/free with new/delete.
Skip write-strings compile warnings for graphviz_helper.

Still need to migrate the DS update tree to c++.

9 years agolayers: Rename synchDS function to validateVBBinding
Tobin Ehlis [Mon, 16 Mar 2015 17:49:58 +0000 (11:49 -0600)]
layers: Rename synchDS function to validateVBBinding

9 years agolayers: Convert memtracker to cpp
Mark Lobodzinski [Tue, 24 Mar 2015 21:29:24 +0000 (16:29 -0500)]
layers: Convert memtracker to cpp

Take advantage of containers, memory allocation, and strings.

9 years agodemos: Use lower left coord origin for cube
Mike Stroyan [Tue, 24 Mar 2015 21:13:34 +0000 (15:13 -0600)]
demos: Use lower left coord origin for cube

The intel driver currently does only XGL_COORDINATE_ORIGIN_LOWER_LEFT.
Use it for now.

9 years agodemos: Make cube use back face culling.
Mike Stroyan [Thu, 19 Mar 2015 20:29:04 +0000 (14:29 -0600)]
demos: Make cube use back face culling.

Use back face culling to confirm that the sense is correct.

9 years agointel: Correct xglCmdCopyBufferToImage block size
Mike Stroyan [Tue, 24 Mar 2015 21:10:24 +0000 (15:10 -0600)]
intel: Correct xglCmdCopyBufferToImage block size

Use img layout format for xglCmdCopyBufferToImage block size instead of raw format.

9 years agointel: convert pixels to blocks in meta
Chia-I Wu [Tue, 24 Mar 2015 06:15:30 +0000 (14:15 +0800)]
intel: convert pixels to blocks in meta

Because of the conversion to raw formats, a pixel in a raw format corresponds
to a pixel block in the original format.  This only affects compressed
formats.

Note the meta paths are getting out of control and the generated meta shaders
are never optimal.  They deserve some love.

9 years agointel: fix culling for XGL_COORDINATE_ORIGIN_LOWER_LEFT
Chia-I Wu [Tue, 24 Mar 2015 06:38:14 +0000 (14:38 +0800)]
intel: fix culling for XGL_COORDINATE_ORIGIN_LOWER_LEFT

When the clip origin is XGL_COORDINATE_ORIGIN_LOWER_LEFT, the winding order
should be flipped.

Note we do not really support XGL_COORDINATE_ORIGIN_LOWER_LEFT with this
change.  We need to adjust the viewports too.

9 years agointel: honor depthMode
Chia-I Wu [Tue, 24 Mar 2015 03:13:06 +0000 (11:13 +0800)]
intel: honor depthMode

Set up 3DSTATE_CLIP according to depthMode.

9 years agointel: honor pointOrigin
Chia-I Wu [Tue, 24 Mar 2015 03:01:50 +0000 (11:01 +0800)]
intel: honor pointOrigin

Set up 3DSTATE_SBE according to pointOrigin.  Always enable point sprite when
the topology is POINT_LIST.

Fix tests which did not initialize pointOrigin and programPointSize.

9 years agointel: honor programPointSize
Chia-I Wu [Tue, 24 Mar 2015 02:55:40 +0000 (10:55 +0800)]
intel: honor programPointSize

Set up 3DSTATE_SF according to programPointSize.

9 years agoglvdebug: Fix 'Play To Here' functionality if user clicks on a column > 1.
Peter Lohrmann [Tue, 24 Mar 2015 17:58:19 +0000 (10:58 -0700)]
glvdebug: Fix 'Play To Here' functionality if user clicks on a column > 1.

* Previously, the wrong packet index would be returned, and the replay would play to the end.
* The cause: only the first column has an internal pointer that points to the trace_packet_header, but we were always trying to get it no matter which cell was selected.
* The solution: Get the ModelIndex of the cell at column 0 of the same row, and use that to get the trace_packet_header and packet index.

9 years agoNote how to pin xserver-xorg-video-intel
Mike Stroyan [Mon, 23 Mar 2015 23:36:54 +0000 (17:36 -0600)]
Note how to pin xserver-xorg-video-intel

Prevent updates from overwriting xserver-xorg-video-intel and breaking DRI3.

9 years agoglvdebug: Do not attempt to select an invalid QModelIndex.
Peter Lohrmann [Mon, 23 Mar 2015 23:04:28 +0000 (16:04 -0700)]
glvdebug: Do not attempt to select an invalid QModelIndex.

* With the GroupByFramesProxy enabled, if the user clicked on a 'Frame' row the UI would attempt to select the invalid item. With the current implementation, valid items must come from the QTraceFileModel, not proxy models.

9 years agoglvdebug_xgl: Improve GroupByFrames performance.
Peter Lohrmann [Thu, 12 Mar 2015 09:59:48 +0000 (02:59 -0700)]
glvdebug_xgl: Improve GroupByFrames performance.

* Instead of mapping all the cells to their corresponding source model index, just group the source model rows. When building the groups, the only QModelIndexes created are for the 'Frame #' nodes, which are also the parents of other proxy indexes. All other proxy model indexes are created as-needed in the index(..) method.
* This approach greatly reduces the complexity of building the proxy model, and also reduces the memory consumption of storing the model indexes, and reduces complexity of looking up proxy and source model indexes.
* Note that with the new approach, the sibling() method unexpectedly has to be implemented so that siblings are returned from the proxy model and not from the source model. This appears to be a change (regression?) that was introduced in Qt5.2.

9 years agowin: Add python command to Glave debugger xgl library generation
Jon Ashburn [Thu, 19 Mar 2015 17:57:15 +0000 (11:57 -0600)]
win: Add python command to Glave debugger xgl library generation

These were missed in previous checkin

9 years agoBUILD.md: Update Windows instructions for correct registry and python3.3
Jon Ashburn [Wed, 18 Mar 2015 18:01:19 +0000 (12:01 -0600)]
BUILD.md:  Update Windows instructions for correct registry and python3.3

9 years agowin: Make build able to find python3 on Windows and Linux
Jon Ashburn [Wed, 18 Mar 2015 15:29:11 +0000 (09:29 -0600)]
win: Make build able to find python3 on Windows and Linux

Use the py launcher on Windows which understands she bangs

9 years agotests: Change BIL to SPV in golden image filenames
Cody Northrop [Tue, 17 Mar 2015 21:59:48 +0000 (15:59 -0600)]
tests: Change BIL to SPV in golden image filenames

9 years agoSPIR-V: Change BIL to SPV in all source files
Cody Northrop [Tue, 17 Mar 2015 21:55:58 +0000 (15:55 -0600)]
SPIR-V: Change BIL to SPV in all source files

9 years agoicd: Rename icd-bil.h to icd-spv.h
Cody Northrop [Tue, 17 Mar 2015 20:54:35 +0000 (14:54 -0600)]
icd: Rename icd-bil.h to icd-spv.h

9 years agofix cube demo for .spv filenames
Steve K [Tue, 17 Mar 2015 16:18:08 +0000 (10:18 -0600)]
fix cube demo for .spv filenames

9 years agoFix compilation errors and warnings for latest SPIRV headers.
Steve K [Tue, 17 Mar 2015 15:40:23 +0000 (09:40 -0600)]
Fix compilation errors and warnings for latest SPIRV headers.

9 years agocompiler: Turn off decomposition of clamp for now
Cody Northrop [Tue, 17 Mar 2015 20:35:49 +0000 (14:35 -0600)]
compiler: Turn off decomposition of clamp for now

9 years agoRevert "misc: Explicitly run python for generated code"
Jon Ashburn [Tue, 17 Mar 2015 23:54:58 +0000 (17:54 -0600)]
Revert "misc: Explicitly run python for generated code"

This reverts commit 10e987d610d43b37556df9b12349f9ffc8cb30c4.

9 years agomisc: Explicitly run python for generated code
Jon Ashburn [Tue, 17 Mar 2015 23:34:20 +0000 (16:34 -0700)]
misc: Explicitly run python for generated code
On windows if multiple python versions installed, then command line args
for python scripts fail.  This works around python issue

9 years agolayers: Added fence tracking for command buffer completion
Mark Lobodzinski [Tue, 17 Mar 2015 15:53:12 +0000 (10:53 -0500)]
layers: Added fence tracking for command buffer completion

Cleaned up MemTracker fence tracking for command buffer completions,
fixed several issues with local fences.

9 years agolayers: Reduce unmeaningful error messages for memtracker
Mark Lobodzinski [Thu, 5 Mar 2015 16:07:53 +0000 (10:07 -0600)]
layers: Reduce unmeaningful error messages for memtracker

It is a common case for a command buffer not to have a fence associated
with it -- no reason to call these cases out as errors.

9 years agolayers: MemTracker add check to verify CB complete prior to Reset
Tobin Ehlis [Wed, 4 Mar 2015 15:38:22 +0000 (08:38 -0700)]
layers: MemTracker add check to verify CB complete prior to Reset

If CB fence has not completed on call to Begin or Reset CB, flag validation error.

Various improvements to make sure the CB fence is getting reset as appropriate if the fence completes or is destroyed.

9 years agoglave: Fix build to correctly generate xgl_enum_string_helper.h dependency
Tobin Ehlis [Mon, 16 Mar 2015 17:55:56 +0000 (11:55 -0600)]
glave: Fix build to correctly generate xgl_enum_string_helper.h dependency

9 years agolayers: Update DrawState to use generated struct size functions
Tobin Ehlis [Mon, 16 Mar 2015 16:44:40 +0000 (10:44 -0600)]
layers: Update DrawState to use generated struct size functions

Update struct size codegen to handle callback void* case and ppMemBarriers void** cases conservatively for now.

9 years agoglave: Use generated code to get pAppInfo struct size
Tobin Ehlis [Mon, 16 Mar 2015 14:21:33 +0000 (08:21 -0600)]
glave: Use generated code to get pAppInfo struct size

9 years agoglave: Update more trace custom code to use generated struct sizing code instead
Tobin Ehlis [Fri, 13 Mar 2015 13:18:05 +0000 (07:18 -0600)]
glave: Update more trace custom code to use generated struct sizing code instead

9 years agoglave: Add codgen helper for struct size calculation and use for trace packet creation
Tobin Ehlis [Thu, 12 Mar 2015 20:50:40 +0000 (14:50 -0600)]
glave: Add codgen helper for struct size calculation and use for trace packet creation

9 years agointel: update layout code from ilo
Chia-I Wu [Fri, 6 Mar 2015 22:01:45 +0000 (06:01 +0800)]
intel: update layout code from ilo

The new code has Gen8 support and minor bug fixes.  It also switched from
INTEL_TILING_x to GEN6_TILING_x.

9 years agointel: call intel_bo_set_tiling() on presentable images
Chia-I Wu [Fri, 6 Mar 2015 22:00:46 +0000 (06:00 +0800)]
intel: call intel_bo_set_tiling() on presentable images

KMD does not need to be smart anymore.

9 years agoglave: Codegen cleanup for tracing code to add/finalize ptrs in packet
Tobin Ehlis [Wed, 11 Mar 2015 23:19:54 +0000 (17:19 -0600)]
glave: Codegen cleanup for tracing code to add/finalize ptrs in packet

9 years agoglave: Simplify codegen for trace packet sizing
Tobin Ehlis [Tue, 10 Mar 2015 17:04:17 +0000 (11:04 -0600)]
glave: Simplify codegen for trace packet sizing

9 years agoglvdebug_xgl: Pass updated settings to the replay worker. This allows us to add and...
Peter Lohrmann [Tue, 3 Mar 2015 20:28:44 +0000 (12:28 -0800)]
glvdebug_xgl: Pass updated settings to the replay worker. This allows us to add and remove enabled layers without having to re-open the trace file.

9 years agoglave-generate: Replace asserts with proper error detection and error logging.
Peter Lohrmann [Tue, 10 Mar 2015 22:30:36 +0000 (15:30 -0700)]
glave-generate: Replace asserts with proper error detection and error logging.

* On Linux debug builds, the asserts cause the debugger to abort, but the code wasn't handling the error case safely anyway, so even a release build would likely crash.
* These situations were being hit if trying to load a trace file from an earlier header version, but are likely to be conditions we'll see when new developers start to use the API.
* With these changes, the error is properly reported and error return values propogated so that the UI detects the invalid file and reports an error to the user.
* The new glv_LogError(..) messages get printed to the console, but are not yet passed to the UI. This will be done as part of a larger change sometime in the future.

9 years agoglvdebug: Move trace file loading to a separate thread.
Peter Lohrmann [Tue, 10 Mar 2015 20:11:20 +0000 (13:11 -0700)]
glvdebug: Move trace file loading to a separate thread.

* Add a glvdebug_QTraceFileLoader class to perform the file loading; execute it on the TraceLoaderThread.
* When the file loading is complete, TraceFileLoaded(..) is signaled indicating if the load was successful, the trace file info, and the path to the controller that was used to load the file.
* The main UI's onTraceFileLoaded(..) slot is called on the main thread.
** The controller's settings are now updated in the main thread after the trace file is successfully loaded.
** The controller library is now loaded once in the loader thread for interpretting packets, and a second time in the main thread for controlling the UI and replaying.
** The UI is updated based on the controller and the loaded trace file.

* Some logical rework had to be done around 'Generate Trace' functionality so that the dialog would be shown again if the generated trace file could not be loaded.
** Keep a boolean that indicates that the user is generating a trace.
** If the boolean is true and the generated trace file fails to load, then respawn the Generate Trace Dialog.
** If a trace file is successfully loaded then set the boolean to false.
** If the user says they don't want to load the trace, then set the boolean to false.

9 years agoglvdebug: Enable 'Stop' button while replayer is paused.
Peter Lohrmann [Mon, 9 Mar 2015 19:36:08 +0000 (12:36 -0700)]
glvdebug: Enable 'Stop' button while replayer is paused.

* Previously the user had to 'Continue' the replayer, then click 'Stop'.
* There a few things that can only take effect if the replayer is stopped (ie, changing replay settings), and most often the user will do this while the replayer is paused. This allows them to more easily stop and restart the replayer.
* Also disables all replayer buttons when the 'Pause' button is pressed, to ensure that the user doesn't put the system in a bad state while waiting for the replay to respond to the 'Pause' event.

9 years agoglvdebug: additional error protection around invalid packets. * This can occur if...
Peter Lohrmann [Mon, 9 Mar 2015 19:01:13 +0000 (12:01 -0700)]
glvdebug: additional error protection around invalid packets. * This can occur if using a trace file based on an older API header version if new entrypoints have been added to the latest API header.

9 years agoglave: Fix createRenderpass replay restore of remapped FB
Jon Ashburn [Mon, 9 Mar 2015 17:33:40 +0000 (11:33 -0600)]
glave: Fix createRenderpass replay restore of remapped FB

9 years agoWin/glvdebug: Remove assert for lack of dot on Windows.
Ian Elliott [Fri, 6 Mar 2015 23:41:01 +0000 (16:41 -0700)]
Win/glvdebug: Remove assert for lack of dot on Windows.

Use the same error as on Linux when dot can't be found.  This seems to allow
the debugger to be fully functional on Windows.

9 years agoWin/C11: Use _align_malloc() on Windows, align_alloc() elsewhere.
Ian Elliott [Fri, 6 Mar 2015 21:34:47 +0000 (14:34 -0700)]
Win/C11: Use _align_malloc() on Windows, align_alloc() elsewhere.

9 years agoWin/Glave: Update Glave's README.md file.
Ian Elliott [Fri, 6 Mar 2015 21:29:19 +0000 (14:29 -0700)]
Win/Glave: Update Glave's README.md file.

9 years agolayers: Improve PresentableImage memory handling in mem/objecttracker
Mark Lobodzinski [Thu, 5 Mar 2015 18:39:33 +0000 (12:39 -0600)]
layers: Improve PresentableImage memory handling in mem/objecttracker

Add handling to eliminate meaningless error reporting for the
xglWsiX11CreatePresentableImage memory resources.

9 years agoWin: Fix compiler warning--explicitly use a float when needed.
Ian Elliott [Fri, 6 Mar 2015 20:56:52 +0000 (13:56 -0700)]
Win: Fix compiler warning--explicitly use a float when needed.

Otherwise, a double is assumed, and a warning is generated that the double is
being "truncated" into a float.

9 years agoWin: Fix warnings for parameter of getLayerOptionEnum()
Ian Elliott [Fri, 6 Mar 2015 20:50:05 +0000 (13:50 -0700)]
Win: Fix warnings for parameter of getLayerOptionEnum()

9 years agoWin: Fix a compiler warning in "icd/common"
Ian Elliott [Fri, 6 Mar 2015 20:49:44 +0000 (13:49 -0700)]
Win: Fix a compiler warning in "icd/common"

9 years agotests: Update framework to initialize clear color to black
Tobin Ehlis [Fri, 6 Mar 2015 20:16:37 +0000 (13:16 -0700)]
tests: Update framework to initialize clear color to black

9 years agoUpdate xgl_helper to handle all of the dynamic arrays
Tobin Ehlis [Fri, 6 Mar 2015 17:38:25 +0000 (10:38 -0700)]
Update xgl_helper to handle all of the dynamic arrays

9 years agoWin/glvdebug: The glvdebug_xgl library depends on Qt5Svgd.dll
Ian Elliott [Fri, 6 Mar 2015 20:04:43 +0000 (13:04 -0700)]
Win/glvdebug: The glvdebug_xgl library depends on Qt5Svgd.dll

9 years agointel: add support for xglPinSystemMemory()
Chia-I Wu [Fri, 6 Mar 2015 19:10:13 +0000 (12:10 -0700)]
intel: add support for xglPinSystemMemory()

The updated kmd supports intel_winsys_import_userptr() for pinning.

9 years agointel: update kmd
Chia-I Wu [Thu, 5 Mar 2015 23:19:42 +0000 (16:19 -0700)]
intel: update kmd

intel_winsys_import_userptr() was added.

intel_winsys_read_reset_stats() was renamed to intel_winsys_get_reset_stats().

intel_bo_reference()/intel_bo_unreference() was replaced by
intel_bo_ref()/intel_bo_unref().

intel_winsys_alloc_buffer() was renamed to intel_winsys_alloc_bo().  The
old intel_winsys_alloc_bo() was removed and intel_bo_set_tiling() was
added.

9 years agoglave: Remove unnecessary dot dump.
Jeremy Hayes [Fri, 6 Mar 2015 19:58:13 +0000 (12:58 -0700)]
glave: Remove unnecessary dot dump.

9 years agoWin/glvdebug: Update the BUILD.md dependencies.
Ian Elliott [Fri, 6 Mar 2015 18:37:07 +0000 (11:37 -0700)]
Win/glvdebug: Update the BUILD.md dependencies.

Update the BUILD.md dependencies in order to build Glave debugger/GUI on
Windows.

9 years agointel: emit 3DSTATE_PUSH_CONSTANT_ALLOC_x in intel_cmd_begin()
Chia-I Wu [Fri, 27 Feb 2015 21:35:08 +0000 (14:35 -0700)]
intel: emit 3DSTATE_PUSH_CONSTANT_ALLOC_x in intel_cmd_begin()

Emit it once per command buffer.

9 years agointel: emit FB-dependent states conditionally
Chia-I Wu [Fri, 27 Feb 2015 21:59:50 +0000 (14:59 -0700)]
intel: emit FB-dependent states conditionally

Emit 3DSTATE_MULTISAMPLE, 3DSTATE_DRAWING_RECTANGLE, 3DSTATE_DEPTH_BUFFER, etc
only when the render pass changed.

9 years agointel: determine 3DSTATE_MULTISAMPLE from intel_fb
Chia-I Wu [Mon, 2 Mar 2015 18:19:33 +0000 (11:19 -0700)]
intel: determine 3DSTATE_MULTISAMPLE from intel_fb

9 years agointel: add intel_pipeline_init_default_sample_patterns()
Chia-I Wu [Mon, 2 Mar 2015 17:51:39 +0000 (10:51 -0700)]
intel: add intel_pipeline_init_default_sample_patterns()

Initialize sample patterns once, not every time a PSO is created.

9 years agointel: update genhw headers
Chia-I Wu [Thu, 5 Mar 2015 22:43:16 +0000 (15:43 -0700)]
intel: update genhw headers

Lots of renames and Gen8 support.  Changes verified by "gcc -E" and diff to
have some confidence that I did not mess up.

9 years agoWin/glvdebug: Use a "\\" instead of "/" for Windows path separator.
Ian Elliott [Thu, 5 Mar 2015 22:45:47 +0000 (15:45 -0700)]
Win/glvdebug: Use a "\\" instead of "/" for Windows path separator.

9 years agonulldrv: build it on Linux
Chia-I Wu [Thu, 5 Mar 2015 21:22:56 +0000 (14:22 -0700)]
nulldrv: build it on Linux

It compiles!

9 years agonulldrv: fix gcc errors/warnings
Chia-I Wu [Thu, 5 Mar 2015 21:26:54 +0000 (14:26 -0700)]
nulldrv: fix gcc errors/warnings

The only functional change should be that _aligned_malloc() is replaced by
malloc().  It does not seem to matter.

9 years agoicd: remove stale function declarations
Chia-I Wu [Wed, 4 Mar 2015 18:19:59 +0000 (11:19 -0700)]
icd: remove stale function declarations

Remove declarations of

  icdDbgRegisterMsgCallback()
  icdDbgUnregisterMsgCallback()
  icdDbgSetGlobalOption()

9 years agoicd: remove unused icd-alloc.[ch]
Chia-I Wu [Sun, 22 Feb 2015 06:41:03 +0000 (14:41 +0800)]
icd: remove unused icd-alloc.[ch]

9 years agonulldrv: remove icd-alloc.h dependency
Chia-I Wu [Sun, 22 Feb 2015 06:40:25 +0000 (14:40 +0800)]
nulldrv: remove icd-alloc.h dependency

9 years agointel: use intel_alloc()/intel_free() everywhere
Chia-I Wu [Sun, 22 Feb 2015 06:09:00 +0000 (14:09 +0800)]
intel: use intel_alloc()/intel_free() everywhere

Make intel_handle available in the functions that icd_alloc()/icd_free() is
still called, and convert them to use intel_alloc()/intel_free().

9 years agointel: use intel_alloc()/intel_free() when possible
Chia-I Wu [Sun, 22 Feb 2015 05:49:15 +0000 (13:49 +0800)]
intel: use intel_alloc()/intel_free() when possible

There are still a few places that intel_handle is not readily available and we
are stuck with icd_alloc()/icd_free().  They will be fixed later.

9 years agointel: add intel_{alloc,free,logv,log}()
Chia-I Wu [Mon, 19 Jan 2015 03:14:00 +0000 (11:14 +0800)]
intel: add intel_{alloc,free,logv,log}()

They are per-instance equivalents of icd_{alloc,free,logv,log}().  They also
require us to embed a pointer to icd_instance in intel_handle.

9 years agoicd: add support for per-instance DRM enumeration
Chia-I Wu [Fri, 20 Feb 2015 20:41:57 +0000 (13:41 -0700)]
icd: add support for per-instance DRM enumeration

Add icd_instance to DRM enumeration functions, and use it for memory
allocation or logging.

9 years agointel: make intel_instance own an icd_instance
Chia-I Wu [Sat, 21 Feb 2015 06:19:23 +0000 (14:19 +0800)]
intel: make intel_instance own an icd_instance

intel_instance is now correctly allocated by icd_instance.

9 years agoicd: add generic icd_instance
Chia-I Wu [Sat, 21 Feb 2015 06:00:17 +0000 (14:00 +0800)]
icd: add generic icd_instance

It provides memory allocation and logging support.

9 years agointel: make intel_base_create() take a intel_handle
Chia-I Wu [Sun, 22 Feb 2015 05:19:54 +0000 (13:19 +0800)]
intel: make intel_base_create() take a intel_handle

With this change, we now create intel_dev using

  dev = intel_base_create(&gpu->handle, ...);

instead of

  dev = intel_base_create(NULL, ...);

The calls to intel_dev_log() in base_dbg_copy_create_info() are removed.  One
of them is replaced an assert() and the other should have been called in
intel_mem_alloc().

9 years agoWin: Fix compilation errors.
Ian Elliott [Thu, 5 Mar 2015 19:28:53 +0000 (12:28 -0700)]
Win: Fix compilation errors.

9 years agoWin/glvdebug: Need libGLESv2d.dll and libEGLd.dll to work on Window.
Ian Elliott [Thu, 5 Mar 2015 19:11:38 +0000 (12:11 -0700)]
Win/glvdebug: Need libGLESv2d.dll and libEGLd.dll to work on Window.

9 years agoWin/glvdebug: Eliminate dead code.
Ian Elliott [Wed, 4 Mar 2015 23:33:28 +0000 (16:33 -0700)]
Win/glvdebug: Eliminate dead code.

9 years agoWin/glvdebug: Changes needed to compile glvdebug on Windows.
Ian Elliott [Wed, 4 Mar 2015 22:39:21 +0000 (15:39 -0700)]
Win/glvdebug: Changes needed to compile glvdebug on Windows.

9 years agoWin: Require CMake 3.0+, and look for Qt 5.3 in default location.
Ian Elliott [Wed, 4 Mar 2015 20:48:59 +0000 (13:48 -0700)]
Win: Require CMake 3.0+, and look for Qt 5.3 in default location.

CMake 3.0+ has the ability to "find_package(Qt5".  Thus, we will require at
least this version for Windows.

CMake still isn't smart enough to go looking for Qt 5.3, and another
modification is to look to see whether it's installed (on Windows) in the
default location.  If so, set Qt5_DIR to point to it.

9 years agotests: Remove Opengl / Glut dependencies
Tony Barbour [Wed, 25 Feb 2015 00:20:27 +0000 (17:20 -0700)]
tests: Remove Opengl / Glut dependencies

9 years agotests: Use buffers format when writing PPM files
Tony Barbour [Wed, 25 Feb 2015 18:25:11 +0000 (11:25 -0700)]
tests: Use buffers format when writing PPM files

Also change tests to use BGRA by default

Also change WritePPM to use BGRA format

9 years agotests: Use XGL to --show-images instead of OpenGL/Glut
Tony Barbour [Wed, 25 Feb 2015 19:28:39 +0000 (12:28 -0700)]
tests: Use XGL to --show-images instead of OpenGL/Glut

9 years agotests: Move environment object into sharable file
Tony Barbour [Mon, 2 Mar 2015 23:38:52 +0000 (16:38 -0700)]
tests: Move environment object into sharable file

9 years agolayers: Fix Windows build issue
Courtney Goeltzenleuchter [Wed, 4 Mar 2015 22:47:34 +0000 (15:47 -0700)]
layers: Fix Windows build issue