Cody Northrop [Wed, 24 Sep 2014 21:38:52 +0000 (15:38 -0600)]
compiler: Progagate compile results to xgl, don't use them yet
Cody Northrop [Tue, 23 Sep 2014 16:06:32 +0000 (10:06 -0600)]
compiler: Get enough turned on to generate ISA
Cody Northrop [Fri, 19 Sep 2014 21:11:52 +0000 (15:11 -0600)]
compiler: Turn on enough to invoke front end during XGL execution
Remove glassy compile checks, fix more things to run glsl
Consume glsl in the stack, store resulting IR
Fix up things enough to invoke our shader compiler with glsl, via
the real XGL calls. Store the result as a gl_shader_program which
contains the IR.
The test still consumes the ISA generated by hand, but it will
print out the IR generated by xglCreateShader. It will continue
to use hand ISA until we implement xglCreateGraphicsPipeline, which
will lower the IR to ISA using NOS.
Cody Northrop [Fri, 19 Sep 2014 15:02:56 +0000 (09:02 -0600)]
compiler: enable SSO for standalone shader compile and link
Steve K [Fri, 19 Sep 2014 15:59:26 +0000 (09:59 -0600)]
Use llvm-config to get --cxxflags for llvm (and remove old hack hardcoding them in the cmakefile).
Add some basic error reporting if first call to llvm-config fails, perhaps because it's missing or some such.
Steve K [Fri, 19 Sep 2014 15:45:36 +0000 (09:45 -0600)]
Print an error if llvm-config fails when running cmake.
Steve K [Fri, 19 Sep 2014 14:50:44 +0000 (08:50 -0600)]
There's no non-glassy mode left, so _mesa_use_glass always returns true now. This
lets xglCompiler standalone run successfully on a trivial test shader.
Steve K [Fri, 19 Sep 2014 14:46:17 +0000 (08:46 -0600)]
Fix link errors in the way of building xglCompiler. Note that it still crashes if you
try to, let's say... use it in any way whatsoever.
Cody Northrop [Wed, 17 Sep 2014 22:18:12 +0000 (16:18 -0600)]
compiler: Import Mesa compiler components
Merciliess removal of gl_context state
compiler: Bring glslang and LunarGLASS into CMake process
compiler: Progress (?) towards standalone xglCompiler
Cody Northrop [Wed, 17 Sep 2014 22:17:35 +0000 (16:17 -0600)]
compiler: Bring over select required files from alchemist-10.2.6+steamos-LunarG-1.1
Cody Northrop [Wed, 17 Sep 2014 20:06:55 +0000 (14:06 -0600)]
compiler: Bring over glsl compiler from alchemist-10.2.6+steamos-LunarG-1.1
Tobin Ehlis [Tue, 28 Oct 2014 15:19:13 +0000 (09:19 -0600)]
layers: Update object tracker to account for Memory alloc/free
Tobin Ehlis [Mon, 27 Oct 2014 23:12:54 +0000 (17:12 -0600)]
layers: Verify that slot binding is compatible with shader mapping
Tobin Ehlis [Mon, 27 Oct 2014 20:53:17 +0000 (14:53 -0600)]
Bug fixes and enhancements to draw_state.c
Jon Ashburn [Fri, 24 Oct 2014 21:57:32 +0000 (15:57 -0600)]
Layers: Change Basic layer to implement an extension and wrap GetExtension
Jon Ashburn [Fri, 24 Oct 2014 21:48:55 +0000 (15:48 -0600)]
Loader: GPA fixes and also properly insert wrapped gpu objs into chain
Loader wasn't properly inserting the wrapped gpu objects for activated layers
into the chain of objects. This was a problem for any calls that used
the wrapped gpu object chain after activation of layers.
Tobin Ehlis [Fri, 24 Oct 2014 19:03:56 +0000 (13:03 -0600)]
Bug fixes for draw_state.c layer
Tobin Ehlis [Fri, 24 Oct 2014 18:01:45 +0000 (12:01 -0600)]
Initial version of draw state layer
Prints out Descriptor Set state at the time of Draw.
Tobin Ehlis [Thu, 23 Oct 2014 21:18:50 +0000 (15:18 -0600)]
Destroy device before calling 2nd initAndEnum...
Tobin Ehlis [Thu, 23 Oct 2014 19:45:13 +0000 (13:45 -0600)]
Add xglDestroyDevice() call to test framework.
Jon Ashburn [Thu, 23 Oct 2014 16:59:23 +0000 (10:59 -0600)]
layers: update documentation
Jon Ashburn [Thu, 23 Oct 2014 16:29:09 +0000 (10:29 -0600)]
Loader: Fix Seg fault when layers not activated via env var
Tobin Ehlis [Thu, 23 Oct 2014 14:44:44 +0000 (08:44 -0600)]
layers : Updates to layers README
Tobin Ehlis [Thu, 23 Oct 2014 14:19:47 +0000 (08:19 -0600)]
More formated struct printing for API Dump
Jon Ashburn [Thu, 23 Oct 2014 03:15:26 +0000 (21:15 -0600)]
Fix memory leaks in loader related to layers.
Jon Ashburn [Thu, 23 Oct 2014 00:13:16 +0000 (18:13 -0600)]
Make layer activation via CreateDevice struct or env variable
Also finish making all activated layers per icd and per gpu.
Tobin Ehlis [Wed, 22 Oct 2014 21:13:53 +0000 (15:13 -0600)]
Better memory management in api_dump layer and struct print helper
Jon Ashburn [Wed, 22 Oct 2014 18:42:13 +0000 (12:42 -0600)]
Loader: fix dispatch table initialization to handle multiple layers
Tobin Ehlis [Wed, 22 Oct 2014 15:06:33 +0000 (09:06 -0600)]
Improved API Dump and OBJ Track layers
Added generator script just for layers that generates API Dump and Object Tracker layers. Improved output of API Dump layer.
Tobin Ehlis [Tue, 21 Oct 2014 16:47:45 +0000 (10:47 -0600)]
Initial layer to dump api calls
Tobin Ehlis [Mon, 20 Oct 2014 22:50:21 +0000 (16:50 -0600)]
Added object_track.c layer and include cmake step to build libXGLLayerObjectTrack.so
Jon Ashburn [Fri, 17 Oct 2014 21:31:22 +0000 (15:31 -0600)]
Change GetProcAddr function signature to use XGL types.
Fix bug in GPA for basic_plugin.c .
Jon Ashburn [Fri, 17 Oct 2014 21:09:07 +0000 (15:09 -0600)]
Make layer activation per icd in loader and gets deactivated.
Fixes issue where multiple xglInitAndEnumerate were causing the layer
activation to fail and dispatch table setup in loader to fail.
Jon Ashburn [Thu, 16 Oct 2014 21:48:50 +0000 (15:48 -0600)]
Add function to set an icd's dispatch table for subsequently created objects.
With layers the loaders dispatch table is used instead of the drivers dispatch
table. The gpu objects were reflecting this change but not subsequent objects.
Tell the icd driver about the loader's dispatch table so it will use it on
object creation rather than the default driver dispatch table.
Jon Ashburn [Wed, 15 Oct 2014 21:30:23 +0000 (15:30 -0600)]
Add xglEnumerateLayers function including support in layers.
Also add this call to xglbase (init.cpp) test.
Jon Ashburn [Wed, 15 Oct 2014 18:08:33 +0000 (12:08 -0600)]
Fixes to Basic and Generic layers to work singly with LD_PRELOAD
Jon Ashburn [Wed, 15 Oct 2014 01:15:22 +0000 (19:15 -0600)]
Layers initial prototype.
Includes an auto generated layer (GenericLayer) that wraps all api calls.
Includes a basic handwritten layer (basicLayer) that wraps a few apis.
Adds xglGetProcAddr as a new api, which is used to chain layers together.
All layers and loader implement a dispatch table.
Courtney Goeltzenleuchter [Tue, 28 Oct 2014 16:29:27 +0000 (10:29 -0600)]
loader: initialize memory
uninitialized use from by valgrind
Chia-I Wu [Tue, 28 Oct 2014 03:19:36 +0000 (11:19 +0800)]
intel: add INTEL_DEBUG=nocache
INTEL_DEBUG=nocache flushes all caches after each draw call. We may start
running into render corruptions as we feed more test cases to the driver.
This option allows us to know if the corruption is cache-related quickly.
Chia-I Wu [Tue, 28 Oct 2014 03:40:29 +0000 (11:40 +0800)]
intel: always emit DEPTH_STENCIL_STATE for meta
DEPTH_STENCIL_STATE is always referenced by the hardware.
Chia-I Wu [Tue, 28 Oct 2014 03:19:14 +0000 (11:19 +0800)]
intel: add a missing WA in the meta path
A scoreboard stall needs to be emitted prior to any change to "Maximum Number
of Threads" of 3DSTATE_PS. If the normal draw path and the meta path
programmed the same value for the field, we probably could skip this WA. But
let's play safe.
Chia-I Wu [Tue, 28 Oct 2014 06:17:43 +0000 (14:17 +0800)]
intel: fix clears with mipLevels > 1
meta->dst.layer should be reset to range->baseArraySlice for each mip level.
Otherwise, we may render out-of-bound and cause screen corruptions.
Chia-I Wu [Sat, 25 Oct 2014 05:59:45 +0000 (13:59 +0800)]
intel: improve blob decoding
The last few dwords were skipped if the total number of dwords was not a
multiple of 4. Change the formatting for better readability.
Chia-I Wu [Fri, 24 Oct 2014 07:34:07 +0000 (15:34 +0800)]
intel: disable PS for depth/stencil clears
We can set the Z coordinate of the clear rectangle to depth clear value and
set stencil reference value to stencil clear value. Neither requires PS to be
enabled.
Chia-I Wu [Fri, 24 Oct 2014 03:57:51 +0000 (11:57 +0800)]
intel: create intel_ds_state for depth/stencil clears
It controls whether depth, stencil, or both are cleared.
Chia-I Wu [Fri, 24 Oct 2014 01:49:50 +0000 (09:49 +0800)]
intel: use helper funtions in gen6_meta_depth_buffer()
There are helper functions to emit depth-related hardware states. Use them.
Chia-I Wu [Fri, 24 Oct 2014 04:31:29 +0000 (12:31 +0800)]
intel: allow depthWriteEnable to be independently enabled
When depthTestEnable is false, the hardware works as if the depth test always
passes and depthWriteEnable can still be honored. It is unclear what the API
intends to do, but let's follow the hardware for now.
Chia-I Wu [Wed, 22 Oct 2014 17:38:26 +0000 (01:38 +0800)]
intel: fix an assertion in create info copying
XGL_VIEWPORT_STATE_CREATE_INFO has no header and we should not assert
info.header->next to be NULL.
Chia-I Wu [Fri, 17 Oct 2014 06:47:18 +0000 (14:47 +0800)]
intel: implement cmd_draw_meta()
It emits the necessary hardware states for a meta op. Copying with
depth/stencil or multisample source is not supported yet. Clearing
depth/stencil destination is also unsupported.
Chia-I Wu [Fri, 17 Oct 2014 01:49:22 +0000 (09:49 +0800)]
intel: convert resource operations to meta ops
Convert xgl{Copy,Clear,Resolve}* to meta ops, and call cmd_draw_meta() to
execute them.
cmd_draw_meta() is no-op and will be fixed by the following commit.
Chia-I Wu [Fri, 17 Oct 2014 01:49:16 +0000 (09:49 +0800)]
intel: define meta ops
Meta ops include copy, clear, and resolve. We need a meta shader for each of
the meta ops, and the shaders should be created with intel_dev to avoid
recompilation and locking.
This commit creates only dummy meta shaders. They should be replaced by real
ones when the compiler or assembler is ready.
Chia-I Wu [Sat, 18 Oct 2014 05:25:10 +0000 (13:25 +0800)]
intel: allow a writer to be a reloc target
This allows us to handle STATE_BASE_ADDRESS more elegantly while making reloc
processing slower because of a libdrm_intel limitation. It is justified
though because
- we have to move away from libdrm_intel at some point and
- in xglCmdUpdateMemory, we want to stream the data to the dynamic state
writer and make the dynamic state writer a reloc target.
Chia-I Wu [Mon, 20 Oct 2014 05:50:43 +0000 (13:50 +0800)]
icd: add icd_format_is_equal()
It returns true when the formats are equal.
Chia-I Wu [Tue, 14 Oct 2014 06:27:44 +0000 (14:27 +0800)]
intel: clean up cmd shader cache
Mainly to remove intel_cmd_shader. There were intel_shader,
intel_pipeline_shader, and intel_cmd_shader. When we saw a variable named,
say, fs, we could not relate it to its type immediately. Getting rid of
intel_cmd_shader makes that easier.
This also gives us a nicer API. The cache is now transparent and never fails
cmd building.
Chia-I Wu [Tue, 14 Oct 2014 05:22:31 +0000 (13:22 +0800)]
intel: emit everything at draw time
We do not perform any optimization on the command buffer yet. Emit everything
at draw time makes things easier when we add meta ops (such as image copy).
Once we are more feature complete, we will revisit how command buffer
optimization should be done.
Chia-I Wu [Tue, 14 Oct 2014 05:37:21 +0000 (13:37 +0800)]
intel: fix color/depth attachments size mismatch
The drawing rectangle should be the intersection of all color attachments and
the depth attachment. Merge cmd_bind_rt() and cmd_bind_ds() into
cmd_bind_attachments() so that we can do that.
Move state emission to emit_rt() and emit_ds().
Chia-I Wu [Sat, 18 Oct 2014 04:47:35 +0000 (12:47 +0800)]
intel: handle XGL_LAST_MIP_OR_SLICE
The miplevel or slice count of XGL_IMAGE_SUBRESOURCE_RANGE can have the
special value XGL_LAST_MIP_OR_SLICE.
Chia-I Wu [Mon, 20 Oct 2014 06:55:20 +0000 (14:55 +0800)]
intel: fix 8x sample pattern
Use sample patterns defined by the spec and convert them to hardware patterns.
This fixes 8x sample pattern.
Courtney Goeltzenleuchter [Mon, 13 Oct 2014 23:03:12 +0000 (17:03 -0600)]
intel: Clear pointer after unmapping buffer
Jon Ashburn [Mon, 20 Oct 2014 19:37:31 +0000 (13:37 -0600)]
tests: Fix issue in tests where descriptor set mapping array not initialized
Courtney Goeltzenleuchter [Mon, 13 Oct 2014 18:58:25 +0000 (12:58 -0600)]
intel: Only check string if length > 0
strncmp will return 0 (match) when given two different strings
and a length of 0. Changed code to only do the compare if
length > 0. Now properly handles empty environment variable or
one that has multiple commas in a row.
Courtney Goeltzenleuchter [Fri, 17 Oct 2014 22:21:35 +0000 (16:21 -0600)]
intel: Need to save copy of create_info
Valgrind found that base_dbg_copy_create_info was leaking
the copy of the create_info structure.
Courtney Goeltzenleuchter [Fri, 26 Sep 2014 00:15:33 +0000 (18:15 -0600)]
intel: Fix memory leak found by valgrind
Courtney Goeltzenleuchter [Fri, 26 Sep 2014 00:14:53 +0000 (18:14 -0600)]
intel: Reset pointer after freeing memory
Courtney Goeltzenleuchter [Fri, 26 Sep 2014 00:13:21 +0000 (18:13 -0600)]
intel: fix memory leak spotted by valgrind
Courtney Goeltzenleuchter [Wed, 15 Oct 2014 00:14:31 +0000 (18:14 -0600)]
icd: Fix incorrect return type
Chia-I Wu [Mon, 13 Oct 2014 08:21:39 +0000 (16:21 +0800)]
intel: fix devid override
Chia-I Wu [Mon, 13 Oct 2014 07:44:06 +0000 (15:44 +0800)]
intel: emit BINDING_TABLE_STATE for all stages
We had emit_ps_binding_table() for PS. It turned out it was generic enough to
do all stages.
Chia-I Wu [Mon, 13 Oct 2014 07:35:29 +0000 (15:35 +0800)]
intel: emit SAMPLER_STATE for all stages
We had emit_ps_samplers() for PS. It turned out it was generic enough to do
all stages.
Chia-I Wu [Mon, 13 Oct 2014 05:32:37 +0000 (13:32 +0800)]
intel: fix for a semantic change in libdrm 2.4.57 and later
When a client does
xglInitAndEnumerateGpus();
xglCreateDevice();
// do something
// reinitialize without xglDestroyDevice() first!
xglInitAndEnumerateGpus();
xglCreateDevice();
// do something else
the driver will
open()
close()
open()
close()
on the DRM device. The problem is that the two open()s may return the same
value and confuse libdrm since 2.4.57 (specifically, commit
743af59669).
Making intel_winsys intel_gpu-owned allows the driver to do this instead
open()
intel_winsys_create_for_fd()
intel_winsys_destroy()
close()
open()
intel_winsys_create_for_fd()
intel_winsys_destroy()
close()
Chia-I Wu [Mon, 13 Oct 2014 05:20:11 +0000 (13:20 +0800)]
kmd: fix intel_bo_wait() on kernel 3.17
Kernel 3.17 (commit
5ed0bdf21a specifically) introduced an ABI breakage.
Jon Ashburn [Fri, 3 Oct 2014 22:31:35 +0000 (16:31 -0600)]
Fix loader icd_scan to Null terminate strings
Tobin Ehlis [Tue, 7 Oct 2014 20:41:29 +0000 (14:41 -0600)]
Refactor test code to pull common section into functions
Chia-I Wu [Wed, 8 Oct 2014 00:49:38 +0000 (08:49 +0800)]
intel: add support for FF vertex fetch
shaderEntityIndex is used to index pVertexBindingDescriptions instead of
pVertexAttributeDescriptions. Not really sure how that works.
https://cvs.khronos.org/bugzilla/show_bug.cgi?id=12774#c26
Chia-I Wu [Mon, 6 Oct 2014 07:07:25 +0000 (15:07 +0800)]
include: update xgl.h with FF vertex fetch
https://cvs.khronos.org/svn/repos/oglc/trunk/nextgen/proposals/IMG/xgl_vertex_input_description2_img.h
Chia-I Wu [Wed, 8 Oct 2014 04:24:37 +0000 (12:24 +0800)]
intel: fix untyped memory views on GEN6
Chia-I Wu [Wed, 8 Oct 2014 01:12:58 +0000 (09:12 +0800)]
icd: add icd_format_get_channel_count
Chia-I Wu [Tue, 7 Oct 2014 07:40:38 +0000 (15:40 +0800)]
intel: disable PCB
XGL_LINK_CONST_BUFFER should be consumed by the compiler rather than blindly
pushed.
Chia-I Wu [Tue, 7 Oct 2014 06:45:05 +0000 (14:45 +0800)]
intel: disable HiZ
We are not quite there yet.
Chia-I Wu [Mon, 6 Oct 2014 16:34:13 +0000 (00:34 +0800)]
intel: emit samplers and image/memory views
Emit SAMPLER_STATE and SURFACE_STATE for texturing.
Tobin Ehlis [Mon, 6 Oct 2014 15:07:53 +0000 (09:07 -0600)]
Added graphiviz dot and png files to visualize some API details
Jon Ashburn [Thu, 25 Sep 2014 20:36:58 +0000 (14:36 -0600)]
Fix size as input/output parameter for various xglGet calls.
Jon Ashburn [Wed, 24 Sep 2014 20:17:04 +0000 (14:17 -0600)]
Fix size parameter for xglGetFormatInfo test utilities.
Jon Ashburn [Wed, 24 Sep 2014 19:15:44 +0000 (13:15 -0600)]
Fix size as input parameter to xglGetGpuInfo() for test utilities
Chia-I Wu [Tue, 23 Sep 2014 07:36:53 +0000 (15:36 +0800)]
intel: check for xcb too
Chia-I Wu [Thu, 18 Sep 2014 08:39:06 +0000 (16:39 +0800)]
intel: do not require render node
We can use the primary node for GPUs with an X display associated.
Chia-I Wu [Mon, 15 Sep 2014 06:21:14 +0000 (14:21 +0800)]
intel: add support for XGL_WSI_X11
Chia-I Wu [Tue, 23 Sep 2014 02:37:23 +0000 (10:37 +0800)]
add stubs for XGL_WSI_X11
Chia-I Wu [Tue, 23 Sep 2014 02:37:08 +0000 (10:37 +0800)]
include: add preliminary XGL_WSI_X11 proposal
It is built around DRI3 and Present.
Chia-I Wu [Tue, 23 Sep 2014 07:02:01 +0000 (15:02 +0800)]
intel: remove intel_fence_get_status()
It is equivalent to intel_fence_wait() with timeout set to 0.
Chia-I Wu [Thu, 18 Sep 2014 09:05:09 +0000 (17:05 +0800)]
tidy up the build system a bit
Chia-I Wu [Thu, 18 Sep 2014 08:58:27 +0000 (16:58 +0800)]
delete GitSHA1.c generation
It is unused. Could be revived anytime if found useful.
Chia-I Wu [Thu, 18 Sep 2014 08:11:36 +0000 (16:11 +0800)]
intel: set tiling before exporting
The remote gets the tiling of the bo from DRM_IOCTL_I915_GEM_GET_TILING.
Chia-I Wu [Mon, 15 Sep 2014 07:12:06 +0000 (15:12 +0800)]
intel: add intel_obj_bind_mem()
Make intelBindObjectMemory() a wrapper to it.
Chia-I Wu [Mon, 15 Sep 2014 06:55:25 +0000 (14:55 +0800)]
intel: teach layout about scanout
Chia-I Wu [Mon, 15 Sep 2014 05:52:21 +0000 (13:52 +0800)]
intel: prepare for primary node support
We will be able to support primary nodes once we know how to talk to an X
server.
Chia-I Wu [Mon, 15 Sep 2014 03:06:50 +0000 (11:06 +0800)]
intel: use the common DRM subsystem scanner
Chia-I Wu [Mon, 15 Sep 2014 05:08:49 +0000 (13:08 +0800)]
icd: add an API to scan Linux DRM subsystem
It differs from the scanner in intel ICD in that both legacy (primary) nodes
and render nodes are supported. And it does not open() any of them.
Chia-I Wu [Sat, 13 Sep 2014 05:36:06 +0000 (13:36 +0800)]
xgl-generate: do not hardcode #include's
Add core_headers to xgl.py and use it to generate #include's
Chia-I Wu [Sat, 13 Sep 2014 05:18:47 +0000 (13:18 +0800)]
remove XGLConfig.h.in
Unused.