Cody Northrop [Wed, 15 Oct 2014 23:32:09 +0000 (17:32 -0600)]
compiler: Clean up backend some more
Cody Northrop [Wed, 15 Oct 2014 22:53:50 +0000 (16:53 -0600)]
compiler: Remove some (not nearly all) dead files from frontend
Cody Northrop [Wed, 15 Oct 2014 22:39:23 +0000 (16:39 -0600)]
compiler: Clean up front end changes a bit
Steve K [Wed, 15 Oct 2014 19:52:30 +0000 (13:52 -0600)]
Remove some unneeded non-glassy FS TD scheduler code.
Steve K [Wed, 15 Oct 2014 19:45:12 +0000 (13:45 -0600)]
Remove some unneeded non-glassy code from brw register allocator.
Steve K [Wed, 15 Oct 2014 19:26:21 +0000 (13:26 -0600)]
Cleanup some code that's no longer needed with logical IO.
Steve K [Wed, 15 Oct 2014 19:22:09 +0000 (13:22 -0600)]
Bring across logical IO changes from Mesa branch. Note: some further cleanup
can follow, now that physical IO is no longer needed.
Courtney Goeltzenleuchter [Mon, 13 Oct 2014 17:31:55 +0000 (11:31 -0600)]
tests: Remove CreateShader test
Removed CreateShader test that was not really testing
the driver with a real shader. Instead let the render tests,
which do use real shaders, do the testing.
Chia-I Wu [Mon, 13 Oct 2014 08:04:31 +0000 (16:04 +0800)]
render_tests: fix constant buffer setup
glm::mat4 has 64 bytes yet we copied 256 bytes from it. Fix memory view range
and stride. It worked because
(OWord Dual Block Read/Write)
the surface pitch is ignored, the surface is treated as a 1-dimensional
surface. An element size (pitch) of 16 bytes is used to determine the size
of the buffer for out-of-bounds checking if using the surface state model.
[DevSNB+]
Chia-I Wu [Sat, 11 Oct 2014 06:08:15 +0000 (14:08 +0800)]
intel: use intel_gpu to set up the compiler context
Instead of hardcoding Haswell. The tests now pass on my SandyBridge.
Chia-I Wu [Sat, 11 Oct 2014 04:09:46 +0000 (12:09 +0800)]
intel: remove unused INTEL_EXT_COMPILE_GLSL
Chia-I Wu [Fri, 10 Oct 2014 05:57:29 +0000 (13:57 +0800)]
intel: make intel_ir opaque
It is just gl_shader_program in the end, and we want gl_shader_program to be
opaque. This also forces the driver to correctly use intel_pipeline_shader
instead of intel_ir.
With the change, xglCreateShader() now asks the compiler to compile BIL into
intel_ir. Later when the pipeline is created, the intel_ir is passed to the
compiler again to generate the binary kernel as well as metadata.
Courtney Goeltzenleuchter [Sat, 11 Oct 2014 00:04:39 +0000 (18:04 -0600)]
tests: Add matrix library (libglm-dev) and test
Update draw with uniform to take the uniform (matrix) as a
parameter and can now rotate the test triangle.
Courtney Goeltzenleuchter [Fri, 10 Oct 2014 23:02:53 +0000 (17:02 -0600)]
tests: Rename tests to be shorter and more descriptive
Cody Northrop [Fri, 10 Oct 2014 21:45:00 +0000 (15:45 -0600)]
render_test: Clean up VS uniform test, draw rotated triangle
Cody Northrop [Fri, 10 Oct 2014 21:42:53 +0000 (15:42 -0600)]
compiler: Turn off uniform loads via sampler for vec4 for now
Cody Northrop [Fri, 10 Oct 2014 20:49:36 +0000 (14:49 -0600)]
render_test: Start turning on simplified VS uniform test
Cody Northrop [Fri, 10 Oct 2014 20:48:39 +0000 (14:48 -0600)]
compiler: Propagate VS binding table size
Cody Northrop [Fri, 10 Oct 2014 20:48:05 +0000 (14:48 -0600)]
compiler: Turn off push constants for vec4 shaders
Courtney Goeltzenleuchter [Fri, 10 Oct 2014 22:29:46 +0000 (16:29 -0600)]
intel: Support GLSL compiling in less intrusive way
Removed all the extension semantics. Support for compiling GLSL in the
driver is intended to be a tempory feature and these changes minimize
the impact on the driver and make it easier to remove in the future.
Courtney Goeltzenleuchter [Fri, 10 Oct 2014 19:59:38 +0000 (13:59 -0600)]
tests: Add test to explicitly use GLSL to BIL module
Steve K [Fri, 10 Oct 2014 14:54:29 +0000 (08:54 -0600)]
Connect thin vertical BIL path.
Courtney Goeltzenleuchter [Fri, 10 Oct 2014 15:52:27 +0000 (09:52 -0600)]
tests: Draw two triangles from mesh
Cody Northrop [Fri, 10 Oct 2014 03:26:47 +0000 (21:26 -0600)]
render_test: Turn all tests back on, easier to debug with just one
Cody Northrop [Fri, 10 Oct 2014 03:25:22 +0000 (21:25 -0600)]
render_test: Render a triangle using compiler and vertex fetch
Cody Northrop [Fri, 10 Oct 2014 01:55:56 +0000 (19:55 -0600)]
render_tests: Turn on FS with two uniforms
Courtney Goeltzenleuchter [Thu, 9 Oct 2014 21:40:19 +0000 (15:40 -0600)]
tests: Add another test triangle for compiler
Courtney Goeltzenleuchter [Thu, 9 Oct 2014 21:37:21 +0000 (15:37 -0600)]
tests: Clean up shader code, unused functions.
Courtney Goeltzenleuchter [Thu, 9 Oct 2014 21:36:43 +0000 (15:36 -0600)]
tests: Remove app specific code out of framework
Courtney Goeltzenleuchter [Thu, 9 Oct 2014 21:35:24 +0000 (15:35 -0600)]
tests: Remove ISA byte code now that we can compile
Courtney Goeltzenleuchter [Thu, 9 Oct 2014 21:24:39 +0000 (15:24 -0600)]
intel: Only destroy object if it exists
Courtney Goeltzenleuchter [Thu, 9 Oct 2014 17:05:19 +0000 (11:05 -0600)]
intel: Turn on BIL in driver
Courtney Goeltzenleuchter [Thu, 9 Oct 2014 15:30:32 +0000 (09:30 -0600)]
intel: record size of incoming shader source
Courtney Goeltzenleuchter [Thu, 9 Oct 2014 15:13:56 +0000 (09:13 -0600)]
tests: Add -use-BIL option
Courtney Goeltzenleuchter [Thu, 9 Oct 2014 15:13:18 +0000 (09:13 -0600)]
intel: disable BIL for now
Courtney Goeltzenleuchter [Wed, 8 Oct 2014 20:26:40 +0000 (14:26 -0600)]
tests: Now have two triangle tests using different shaders
Courtney Goeltzenleuchter [Wed, 8 Oct 2014 18:20:26 +0000 (12:20 -0600)]
tests: migrate render test to render framework
Courtney Goeltzenleuchter [Wed, 8 Oct 2014 14:59:45 +0000 (08:59 -0600)]
tests: Make simple test with everything needed
base_render_test does everything needed to render a triangle.
Have in single function to aid understanding what it does.
Courtney Goeltzenleuchter [Wed, 8 Oct 2014 14:50:49 +0000 (08:50 -0600)]
tests: Add another class to help implementing tests
Courtney Goeltzenleuchter [Wed, 8 Oct 2014 14:46:51 +0000 (08:46 -0600)]
tests: Use global SetUp/TearDown for compiler setup
The GLSL compiler requires some one-time per process setup and
teardown to operate properly. Using gtest global environment to
manage those functions.
Courtney Goeltzenleuchter [Mon, 6 Oct 2014 18:45:37 +0000 (12:45 -0600)]
tests: Add additional shaders for testing
Courtney Goeltzenleuchter [Fri, 3 Oct 2014 15:53:32 +0000 (09:53 -0600)]
tests: Add utility function to compile GLSL to BIL
This requires glslang + BIL to be in a peer folder (glslang) to XGL.
Cody Northrop [Wed, 1 Oct 2014 20:03:25 +0000 (14:03 -0600)]
triangle: Hook up a uniform read in fragment shader
Add a constant buffer and descriptor set to render_test
Read the uniform in fragment shader, add it to existing color
Triangle colors should remain, but be whiter
Tobin Ehlis [Tue, 7 Oct 2014 20:41:29 +0000 (14:41 -0600)]
Refactor test code to pull common section into functions
Cody Northrop [Tue, 7 Oct 2014 22:38:45 +0000 (16:38 -0600)]
render_test: Restore use of %
Cody Northrop [Tue, 7 Oct 2014 22:25:00 +0000 (16:25 -0600)]
render_test: refactor image/sampler setup, render textured triangle
Conflicts:
icd/intel/compiler/shader/compiler_interface.cpp
Cody Northrop [Tue, 7 Oct 2014 17:27:25 +0000 (11:27 -0600)]
Undo changes to driver that mirror what Olv cooked up
Cody Northrop [Mon, 6 Oct 2014 23:07:40 +0000 (17:07 -0600)]
render_test: Populate the texture more correctly, render purple triangle
Conflicts:
icd/intel/compiler/shader/compiler_interface.cpp
Cody Northrop [Mon, 6 Oct 2014 21:42:00 +0000 (15:42 -0600)]
render_test: Start turning on sampler and texture setup
Cody Northrop [Mon, 6 Oct 2014 21:41:18 +0000 (15:41 -0600)]
compiler: Changes in the direction of textures and samplers
Cody Northrop [Mon, 6 Oct 2014 21:11:45 +0000 (15:11 -0600)]
compiler: Use pipeline shader rather than info shader for state update
Cody Northrop [Fri, 3 Oct 2014 15:36:37 +0000 (09:36 -0600)]
compiler: Start dumping vertex shader data
Steve K [Tue, 7 Oct 2014 16:57:33 +0000 (10:57 -0600)]
Checkpoint getting LogicalIO working by backing shader off to 130
instead of 430 (which would drag in output blocks). This change
uses the simpler of the two frag shaders in render_tests.cpp,
since that doesn't use more advanced features like layout qualifiers
which may not be present in the BIL->TopIR path yet.
Logical IO is now enabled, as well as a glsl->BIL path. When
BIL is supplied in the shader, we can trim out the glsl bits.
Conflicts:
icd/intel/compiler/shader/compiler_interface.cpp
Steve K [Tue, 7 Oct 2014 16:44:41 +0000 (10:44 -0600)]
Checkpoint some work on useLogicalIO mode for converter, and going through a BIL
conversion in the compile method. That'll change soon to consume BIL directly
instead of converting it from glsl.
This is disabled for the moment pending figuring out the varying output count
problem.
Conflicts:
icd/intel/CMakeLists.txt
icd/intel/compiler/shader/compiler_interface.cpp
Courtney Goeltzenleuchter [Mon, 6 Oct 2014 18:45:37 +0000 (12:45 -0600)]
tests: Add additional shaders for testing
Courtney Goeltzenleuchter [Mon, 6 Oct 2014 18:44:43 +0000 (12:44 -0600)]
intel: complete plumbing to add GLSL compile extension
Courtney Goeltzenleuchter [Mon, 6 Oct 2014 18:44:03 +0000 (12:44 -0600)]
intel: Add shader structure for GLSL compile extension
Courtney Goeltzenleuchter [Mon, 6 Oct 2014 15:45:33 +0000 (09:45 -0600)]
intel: Prepare CreateShader to accept BIL and GLSL
Courtney Goeltzenleuchter [Mon, 6 Oct 2014 15:44:58 +0000 (09:44 -0600)]
intel: Fix use of wrong extension name
Courtney Goeltzenleuchter [Sat, 4 Oct 2014 00:05:10 +0000 (18:05 -0600)]
checkpoint: Adding GLSL compiler extension
Courtney Goeltzenleuchter [Fri, 3 Oct 2014 21:34:53 +0000 (15:34 -0600)]
cmake: Lift common glslang definitions up to main CMakeLists
Courtney Goeltzenleuchter [Fri, 3 Oct 2014 15:53:32 +0000 (09:53 -0600)]
tests: Add utility function to compile GLSL to BIL
This requires glslang + BIL to be in a peer folder (glslang) to XGL.
Cody Northrop [Wed, 1 Oct 2014 20:03:25 +0000 (14:03 -0600)]
triangle: Hook up a uniform read in fragment shader
Add a constant buffer and descriptor set to render_test
Read the uniform in fragment shader, add it to existing color
Triangle colors should remain, but be whiter
Cody Northrop [Wed, 1 Oct 2014 19:51:23 +0000 (13:51 -0600)]
compiler: Print out more push/pull param info
Steve K [Wed, 1 Oct 2014 13:21:15 +0000 (07:21 -0600)]
Fix integer mod.
Cody Northrop [Mon, 29 Sep 2014 20:03:51 +0000 (14:03 -0600)]
compiler: Don't use samplers for uniform loads yet
Cody Northrop [Mon, 29 Sep 2014 19:30:30 +0000 (13:30 -0600)]
compiler: Swap FS and VS ordering in pipeline compiler interface
Cody Northrop [Mon, 29 Sep 2014 19:25:07 +0000 (13:25 -0600)]
compiler: Turn on program limit initialization
Cody Northrop [Mon, 29 Sep 2014 19:21:12 +0000 (13:21 -0600)]
compiler: Turn off push constants for fragment shader
Cody Northrop [Mon, 29 Sep 2014 17:30:59 +0000 (11:30 -0600)]
compiler: Print resulting data structs
Cody Northrop [Fri, 26 Sep 2014 22:27:22 +0000 (16:27 -0600)]
compiler: Turn on URB handling and interstage I/O
Pass VS outputs to FS inputs
Tested with a couple of linear interpolated vec4s
Cody Northrop [Thu, 25 Sep 2014 23:00:31 +0000 (17:00 -0600)]
compiler: Start using VS backend results
Consuming the results of VS backend, similar to FS.
Piping it back to XGL. Should continue to work until more
inputs or outputs are added.
Changed the source GLSL to shrink and recolor triangle
Cody Northrop [Thu, 25 Sep 2014 23:00:02 +0000 (17:00 -0600)]
compiler: Start adding new files for VS
Cody Northrop [Thu, 25 Sep 2014 20:05:09 +0000 (14:05 -0600)]
compiler: Blue triangle
Cody Northrop [Thu, 25 Sep 2014 20:01:19 +0000 (14:01 -0600)]
compiler: Start using fs compile results
Cody Northrop [Thu, 25 Sep 2014 20:00:32 +0000 (14:00 -0600)]
compiler: C linkage for icd alloc and free
Cody Northrop [Thu, 25 Sep 2014 19:56:51 +0000 (13:56 -0600)]
compiler: Disable standalone build for now
Cody Northrop [Thu, 25 Sep 2014 17:40:14 +0000 (11:40 -0600)]
compiler: Turn off SIMD16 for bring up
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