mesa.git
8 years agoMerge branch 'nir-spirv' into vulkan
Jason Ekstrand [Sat, 5 Sep 2015 20:17:53 +0000 (13:17 -0700)]
Merge branch 'nir-spirv' into vulkan

8 years agonir/spirv: Handle decorations after assigning variable locations
Jason Ekstrand [Sat, 5 Sep 2015 20:16:49 +0000 (13:16 -0700)]
nir/spirv: Handle decorations after assigning variable locations

8 years agoMerge branch 'nir-spirv' into vulkan
Jason Ekstrand [Sat, 5 Sep 2015 16:48:15 +0000 (09:48 -0700)]
Merge branch 'nir-spirv' into vulkan

8 years agonir/spirv: Handle the MatrixStride member decoration
Jason Ekstrand [Sat, 5 Sep 2015 16:47:11 +0000 (09:47 -0700)]
nir/spirv: Handle the MatrixStride member decoration

8 years agovk: Actually link in wayland libraries
Jason Ekstrand [Sat, 5 Sep 2015 03:02:36 +0000 (20:02 -0700)]
vk: Actually link in wayland libraries

Turns out this was why I had accidentally broken the universe.  Oops...

8 years agovk: Conditionally compile Wayland support
Jason Ekstrand [Sat, 5 Sep 2015 02:18:50 +0000 (19:18 -0700)]
vk: Conditionally compile Wayland support

Pulling in libwayland causes undefined symbols in applications that are
linked against vulkan alone.  Ideally, we would like to dlopen a platform
support library or something like that.  For now, this works and should get
crucible running again.

8 years agovk: Fix size return value handling in a couple plces
Jason Ekstrand [Sat, 5 Sep 2015 02:05:51 +0000 (19:05 -0700)]
vk: Fix size return value handling in a couple plces

8 years agoMerge branch 'nir-spirv' into vulkan
Jason Ekstrand [Sat, 5 Sep 2015 01:54:15 +0000 (18:54 -0700)]
Merge branch 'nir-spirv' into vulkan

8 years agonir/spirv/glsl450: Use the correct write mask
Jason Ekstrand [Sat, 5 Sep 2015 01:47:56 +0000 (18:47 -0700)]
nir/spirv/glsl450: Use the correct write mask

8 years agonir: Add a lower_fdiv option and use it in i965
Jason Ekstrand [Sat, 5 Sep 2015 01:47:42 +0000 (18:47 -0700)]
nir: Add a lower_fdiv option and use it in i965

8 years agonir/spirv: Use the actual GLSL 450 extension header from Khronos
Jason Ekstrand [Sat, 5 Sep 2015 01:39:57 +0000 (18:39 -0700)]
nir/spirv: Use the actual GLSL 450 extension header from Khronos

8 years agonir/spirv: Add support for SpvDecorationColMajor
Jason Ekstrand [Sat, 5 Sep 2015 01:26:32 +0000 (18:26 -0700)]
nir/spirv: Add support for SpvDecorationColMajor

8 years agonir/types: Allow single-column matrices
Jason Ekstrand [Sat, 5 Sep 2015 01:26:05 +0000 (18:26 -0700)]
nir/types: Allow single-column matrices

This can sometimes be a convenient way to build vectors.

8 years agovk/wsi: Add Wayland WSI support
Jason Ekstrand [Sat, 5 Sep 2015 00:50:32 +0000 (17:50 -0700)]
vk/wsi: Add Wayland WSI support

8 years agovk/wsi: Move to a clallback system for the entire WSI implementation
Jason Ekstrand [Fri, 4 Sep 2015 18:14:45 +0000 (11:14 -0700)]
vk/wsi: Move to a clallback system for the entire WSI implementation

We do this for two reasons: First, because it allows us to simplify WSI and
compiling in/out support for a particular platform is as simple as calling
or not calling the platform-specific init function.  Second, the
implementation gives us a place for a given chunk of the WSI to stash
stuff in the instance.

8 years agovk/instance: Expose anv_instance_alloc/free
Jason Ekstrand [Fri, 4 Sep 2015 18:14:03 +0000 (11:14 -0700)]
vk/instance: Expose anv_instance_alloc/free

8 years agovk/WSI: Use a callback mechanism instead of explicit switching
Jason Ekstrand [Fri, 4 Sep 2015 17:28:26 +0000 (10:28 -0700)]
vk/WSI: Use a callback mechanism instead of explicit switching

8 years agovk: Add an initial implementation of the actual Khronos WSI extension
Jason Ekstrand [Wed, 2 Sep 2015 01:59:06 +0000 (18:59 -0700)]
vk: Add an initial implementation of the actual Khronos WSI extension

Unfortunately, this is a very large commit and removes the old LunarG WSI
extension.  This is because there are a couple of entrypoints that have the
same name between the two extensions so implementing them both is
impractiacl.

Support is still incomplete, but this is enough to get vkcube up and going
again.

8 years agovk: Add initial support for VK_WSI_swapchain
Jason Ekstrand [Wed, 2 Sep 2015 00:00:10 +0000 (17:00 -0700)]
vk: Add initial support for VK_WSI_swapchain

8 years agovk: Move anv_x11.c to anv_wsi_x11.c
Jason Ekstrand [Tue, 1 Sep 2015 23:46:20 +0000 (16:46 -0700)]
vk: Move anv_x11.c to anv_wsi_x11.c

8 years agovk/device: Use an array for device extensions
Jason Ekstrand [Tue, 1 Sep 2015 23:44:42 +0000 (16:44 -0700)]
vk/device: Use an array for device extensions

8 years agovk: Further reduce diff to master
Kristian Høgsberg Kristensen [Fri, 4 Sep 2015 18:46:43 +0000 (11:46 -0700)]
vk: Further reduce diff to master

Now that we don't compile GLSL, we can roll back a few more hacks and
unexport some things from the backend compiler.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
8 years agovk: Drop GLSL code from anv_compiler.cpp
Kristian Høgsberg Kristensen [Thu, 3 Sep 2015 21:02:11 +0000 (14:02 -0700)]
vk: Drop GLSL code from anv_compiler.cpp

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
8 years agovk: Assert that the SPIR-V module has the magic number
Kristian Høgsberg Kristensen [Thu, 3 Sep 2015 19:27:28 +0000 (12:27 -0700)]
vk: Assert that the SPIR-V module has the magic number

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
8 years agovk: Remove various hacks/scaffolding code
Kristian Høgsberg Kristensen [Thu, 3 Sep 2015 19:04:03 +0000 (12:04 -0700)]
vk: Remove various hacks/scaffolding code

Since we switched away from calling brwCreateContext() there's a bit of
hacky support we can now delete.  This reduces our diff to upstream master.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
8 years agovk: Fall back to previous gens in entry point resolver
Kristian Høgsberg Kristensen [Wed, 26 Aug 2015 11:10:58 +0000 (04:10 -0700)]
vk: Fall back to previous gens in entry point resolver

We used to always just do a one-level fallback from genX_* to anv_*
entry points. That worked for gen7 and gen8 where all entry points were
either different or could be made anv_* entry points (eg
anv_CreateDynamicViewportState). We're about to add gen9 and now need to
be able to fall back to gen8 entry points for most things.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
8 years agovk: Drop redundant gen7_CreateGraphicsPipelines
Kristian Høgsberg Kristensen [Thu, 27 Aug 2015 19:04:41 +0000 (12:04 -0700)]
vk: Drop redundant gen7_CreateGraphicsPipelines

This is handled by anv_CreateGraphicsPipelines().

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
8 years agovk: Use vk* entrypoints in meta, not driver_layer pointers
Kristian Høgsberg Kristensen [Wed, 26 Aug 2015 11:08:51 +0000 (04:08 -0700)]
vk: Use vk* entrypoints in meta, not driver_layer pointers

We'll change the dispatch mechanism again in a later commit. Stop using
the driver_layer function pointers and just use the public entry points.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
8 years agovk: Drop check for I915_PARAM_HAS_EXEC_CONSTANTS
Kristian Høgsberg Kristensen [Wed, 26 Aug 2015 11:04:36 +0000 (04:04 -0700)]
vk: Drop check for I915_PARAM_HAS_EXEC_CONSTANTS

We don't use this kernel feature.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
8 years agovk: Add new vk_errorf that takes a format string
Kristian Høgsberg Kristensen [Wed, 26 Aug 2015 11:03:38 +0000 (04:03 -0700)]
vk: Add new vk_errorf that takes a format string

This allows us to annotate error cases in debug builds.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
8 years agovk: Make vk_error a little more helpful
Kristian Høgsberg Kristensen [Wed, 26 Aug 2015 10:41:37 +0000 (03:41 -0700)]
vk: Make vk_error a little more helpful

Print out file and line number and translate the error code to the
symbolic name.

Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
8 years agovk/image: Add PRM reference for QPitch equation
Chad Versace [Thu, 3 Sep 2015 18:03:28 +0000 (11:03 -0700)]
vk/image: Add PRM reference for QPitch equation

Suggested-by: Nanley Chery <nanley.g.chery@intel.com>
8 years agovk/meta: Partially fix vkCmdCopyBufferToImage for S8_UINT
Chad Versace [Tue, 1 Sep 2015 00:44:08 +0000 (17:44 -0700)]
vk/meta: Partially fix vkCmdCopyBufferToImage for S8_UINT

Create R8_UINT VkAttachmentView and VkImageView for the stencil data.

This fixes a crash, but the pixels in the destination image are still
incorrect. They are not properly tiled.

Fixes crashes in Crucible tests func.miptree.s8-uint.aspect-stencil.* as
of crucible-7471449. Test results improve 'lost' -> 'fail'.

8 years agovk/meta: Use SPIR-V for shaders
Jason Ekstrand [Tue, 1 Sep 2015 22:16:06 +0000 (15:16 -0700)]
vk/meta: Use SPIR-V for shaders

We are also now using glslc for compiling the Vulkan driver like we do in
curcible.

8 years agovk/compiler: Handle interpolation qualifiers for SPIR-V shaders
Jason Ekstrand [Tue, 1 Sep 2015 22:15:04 +0000 (15:15 -0700)]
vk/compiler: Handle interpolation qualifiers for SPIR-V shaders

8 years agovk/extensions: count needs to be <= number of extensions
Jason Ekstrand [Tue, 1 Sep 2015 19:23:48 +0000 (12:23 -0700)]
vk/extensions: count needs to be <= number of extensions

8 years agovk/compiler: Properly reference/delete programs when using SPIR-V
Jason Ekstrand [Tue, 1 Sep 2015 18:57:28 +0000 (11:57 -0700)]
vk/compiler: Properly reference/delete programs when using SPIR-V

8 years agovk/meta: Add a helper for making an image from a buffer
Jason Ekstrand [Tue, 1 Sep 2015 04:12:59 +0000 (21:12 -0700)]
vk/meta: Add a helper for making an image from a buffer

8 years agonir/spirv: Use VERTEX_ID_ZERO_BASE for VertexId
Jason Ekstrand [Tue, 1 Sep 2015 00:16:01 +0000 (17:16 -0700)]
nir/spirv: Use VERTEX_ID_ZERO_BASE for VertexId

In Vulkan, VertexId and InstanceId will be zero-based and new intrinsics,
VertexIndex and InstanceIndex, will be added for non-zer-based.  See also,
Khronos bug #14255

8 years agoMerge remote-tracking branch 'fdo-personal/nir-spirv' into vulkan
Jason Ekstrand [Tue, 1 Sep 2015 00:14:47 +0000 (17:14 -0700)]
Merge remote-tracking branch 'fdo-personal/nir-spirv' into vulkan

From now on, the majority of SPIR-V improvements should happen on the spirv
branch which will also be public.  It will be frequently merged into the
vulkan driver.

8 years agonir/spirv: Update to the latest revision
Jason Ekstrand [Mon, 31 Aug 2015 19:48:04 +0000 (12:48 -0700)]
nir/spirv: Update to the latest revision

8 years agonir/builder: Use nir_after_instr to advance the cursor
Jason Ekstrand [Mon, 31 Aug 2015 23:54:02 +0000 (16:54 -0700)]
nir/builder: Use nir_after_instr to advance the cursor

This *should* ensure that the cursor gets properly advanced in all cases.
We had a problem before where, if the cursor was created using
nir_after_cf_node on a non-block cf_node, that would call nir_before_block
on the block following the cf node.  Instructions would then get inserted
in backwards order at the top of the block which is not at all what you
would expect from nir_after_cf_node.  By just resetting to after_instr, we
avoid all these problems.

8 years agonir/intrinsics: Move to a two-dimensional binding model for UBO's
Jason Ekstrand [Mon, 31 Aug 2015 22:54:21 +0000 (15:54 -0700)]
nir/intrinsics: Move to a two-dimensional binding model for UBO's

8 years agonir/nir_variable: Add a descriptor set field
Jason Ekstrand [Mon, 31 Aug 2015 22:34:56 +0000 (15:34 -0700)]
nir/nir_variable: Add a descriptor set field

We need this for SPIR-V

8 years agomesa: Move gl_vert_attrib from mtypes.h to shader_enums.h
Jason Ekstrand [Mon, 31 Aug 2015 21:55:49 +0000 (14:55 -0700)]
mesa: Move gl_vert_attrib from mtypes.h to shader_enums.h

It is a shader enum after all...

8 years agonir/cursor: Add a helper for getting the current block
Jason Ekstrand [Mon, 31 Aug 2015 21:48:10 +0000 (14:48 -0700)]
nir/cursor: Add a helper for getting the current block

8 years agonir/builder: add a nir_fdot() convenience function
Connor Abbott [Fri, 19 Jun 2015 00:34:55 +0000 (17:34 -0700)]
nir/builder: add a nir_fdot() convenience function

8 years agonir: Add a pass to lower outputs to temporary variables
Jason Ekstrand [Sat, 29 Aug 2015 00:09:02 +0000 (17:09 -0700)]
nir: Add a pass to lower outputs to temporary variables

This pass can be used as a helper for NIR producers so they don't have to
worry about creating the temporaries themselves.

8 years agonir/cursor: Add a constructor for the end of a block but before the jump
Jason Ekstrand [Sat, 29 Aug 2015 00:17:39 +0000 (17:17 -0700)]
nir/cursor: Add a constructor for the end of a block but before the jump

8 years agonir/types: add more nir_type_is_xxx() wrappers
Connor Abbott [Thu, 16 Jul 2015 04:58:32 +0000 (21:58 -0700)]
nir/types: add more nir_type_is_xxx() wrappers

8 years agonir/types: add a helper to transpose a matrix type
Connor Abbott [Fri, 19 Jun 2015 00:34:12 +0000 (17:34 -0700)]
nir/types: add a helper to transpose a matrix type

8 years agonir/spirv: Don't assert that the current block is empty
Jason Ekstrand [Sat, 16 May 2015 19:34:32 +0000 (12:34 -0700)]
nir/spirv: Don't assert that the current block is empty

It's possible that someone will give us SPIR-V code in which someone
needlessly branches to new blocks.  We should handle that ok now.

8 years agonir/spirv: Add initial support for samplers
Jason Ekstrand [Sat, 16 May 2015 19:34:15 +0000 (12:34 -0700)]
nir/spirv: Add initial support for samplers

8 years agonir/spirv: Move Exp and Log to the list of currently unhandled ALU ops
Jason Ekstrand [Sat, 16 May 2015 19:33:29 +0000 (12:33 -0700)]
nir/spirv: Move Exp and Log to the list of currently unhandled ALU ops

NIR doesn't have the native opcodes for them anymore

8 years agonir/types: Add support for sampler types
Jason Ekstrand [Sat, 16 May 2015 19:32:58 +0000 (12:32 -0700)]
nir/types: Add support for sampler types

8 years agonir/spirv: Make the global constants in spirv.h static
Jason Ekstrand [Wed, 6 May 2015 22:36:54 +0000 (15:36 -0700)]
nir/spirv: Make the global constants in spirv.h static

I've been promissed in a bug that this will be fixed in a future version of
the header.  However, in the interest of my branch building, I'm adding
these changes in myself for the moment.

8 years agonir/spirv: Handle jump-to-loop in a more general way
Jason Ekstrand [Wed, 6 May 2015 22:33:21 +0000 (15:33 -0700)]
nir/spirv: Handle jump-to-loop in a more general way

8 years agonir/spirv: Handle boolean uniforms correctly
Jason Ekstrand [Wed, 6 May 2015 19:54:02 +0000 (12:54 -0700)]
nir/spirv: Handle boolean uniforms correctly

8 years agonir/spirv: Handle control-flow with loops
Jason Ekstrand [Wed, 6 May 2015 19:37:10 +0000 (12:37 -0700)]
nir/spirv: Handle control-flow with loops

8 years agonir/spirv: Set a name on temporary variables
Jason Ekstrand [Wed, 6 May 2015 19:36:31 +0000 (12:36 -0700)]
nir/spirv: Set a name on temporary variables

8 years agonir/spirv: Use the correct length for copying string literals
Jason Ekstrand [Wed, 6 May 2015 19:36:09 +0000 (12:36 -0700)]
nir/spirv: Use the correct length for copying string literals

8 years agonir/spirv: Make vtn_ssa_value handle constants as well as ssa values
Jason Ekstrand [Wed, 6 May 2015 19:35:30 +0000 (12:35 -0700)]
nir/spirv: Make vtn_ssa_value handle constants as well as ssa values

8 years agonir/spirv: Add initial support for GLSL 4.50 builtins
Jason Ekstrand [Mon, 4 May 2015 22:17:56 +0000 (15:17 -0700)]
nir/spirv: Add initial support for GLSL 4.50 builtins

8 years agonir/spirv: Split the core datastructures into a header file
Jason Ekstrand [Mon, 4 May 2015 19:25:09 +0000 (12:25 -0700)]
nir/spirv: Split the core datastructures into a header file

8 years agonir/spirv: Use the builder for all instructions
Jason Ekstrand [Mon, 4 May 2015 19:12:23 +0000 (12:12 -0700)]
nir/spirv: Use the builder for all instructions

We don't actually use it to create all the instructions but we do use it
for insertion always.  This should make things far more consistent for
implementing extended instructions.

8 years agonir/spirv: Add support for a bunch of ALU operations
Jason Ekstrand [Mon, 4 May 2015 19:04:02 +0000 (12:04 -0700)]
nir/spirv: Add support for a bunch of ALU operations

8 years agonir/spirv: Add support for indirect array accesses
Jason Ekstrand [Mon, 4 May 2015 19:02:57 +0000 (12:02 -0700)]
nir/spirv: Add support for indirect array accesses

8 years agonir/spirv: Explicitly type constants and SSA values
Jason Ekstrand [Mon, 4 May 2015 19:02:24 +0000 (12:02 -0700)]
nir/spirv: Explicitly type constants and SSA values

8 years agonir/spirv: Handle OpBranchConditional
Jason Ekstrand [Mon, 4 May 2015 17:23:09 +0000 (10:23 -0700)]
nir/spirv: Handle OpBranchConditional

We do control-flow handling as a two-step process.  The first step is to
walk the instructions list and record various information about blocks and
functions.  This is where the acutal nir_function_overload objects get
created.  We also record the start/stop instruction for each block.  Then
a second pass walks over each of the functions and over the blocks in each
function in a way that's NIR-friendly and actually parses the instructions.

8 years agonir/spirv: Add a helper for getting a value as an SSA value
Jason Ekstrand [Mon, 4 May 2015 17:22:52 +0000 (10:22 -0700)]
nir/spirv: Add a helper for getting a value as an SSA value

8 years agonir/spirv: Split instruction handling into preamble and body sections
Jason Ekstrand [Fri, 1 May 2015 21:00:57 +0000 (14:00 -0700)]
nir/spirv: Split instruction handling into preamble and body sections

8 years agonir/spirv: Implement load/store instructiosn
Jason Ekstrand [Fri, 1 May 2015 18:28:18 +0000 (11:28 -0700)]
nir/spirv: Implement load/store instructiosn

8 years agonir: Add a helper for getting the tail of a deref chain
Jason Ekstrand [Mon, 4 May 2015 17:19:24 +0000 (10:19 -0700)]
nir: Add a helper for getting the tail of a deref chain

8 years agonir/spirv: Actaully add variables to the funciton or shader
Jason Ekstrand [Fri, 1 May 2015 18:28:01 +0000 (11:28 -0700)]
nir/spirv: Actaully add variables to the funciton or shader

8 years agonir/spirv: Add a vtn_untyped_value helper
Jason Ekstrand [Fri, 1 May 2015 18:27:44 +0000 (11:27 -0700)]
nir/spirv: Add a vtn_untyped_value helper

8 years agonir/spirv: Use vtn_value in the types code and fix a off-by-one error
Jason Ekstrand [Fri, 1 May 2015 18:27:21 +0000 (11:27 -0700)]
nir/spirv: Use vtn_value in the types code and fix a off-by-one error

8 years agonir/types: Add an is_vector_or_scalar helper
Jason Ekstrand [Fri, 1 May 2015 18:26:40 +0000 (11:26 -0700)]
nir/types: Add an is_vector_or_scalar helper

8 years agonir/spirv: Add support for deref chains
Jason Ekstrand [Thu, 30 Apr 2015 03:56:36 +0000 (20:56 -0700)]
nir/spirv: Add support for deref chains

8 years agonir/types: Add a scalar type constructor
Jason Ekstrand [Thu, 30 Apr 2015 03:56:17 +0000 (20:56 -0700)]
nir/types: Add a scalar type constructor

8 years agonir/spirv: Add support for OpLabel
Jason Ekstrand [Thu, 30 Apr 2015 03:19:34 +0000 (20:19 -0700)]
nir/spirv: Add support for OpLabel

8 years agonir/spirv: Add support for declaring functions
Jason Ekstrand [Thu, 30 Apr 2015 03:10:20 +0000 (20:10 -0700)]
nir/spirv: Add support for declaring functions

8 years agonir/types: Add accessors for function parameter/return types
Jason Ekstrand [Thu, 30 Apr 2015 03:09:36 +0000 (20:09 -0700)]
nir/types: Add accessors for function parameter/return types

8 years agonir/spirv: Add support for declaring variables
Jason Ekstrand [Thu, 30 Apr 2015 02:37:41 +0000 (19:37 -0700)]
nir/spirv: Add support for declaring variables

Deref chains and variable load/store operations are still missing.

8 years agonir/spirv: Add support for constants
Jason Ekstrand [Thu, 30 Apr 2015 01:14:11 +0000 (18:14 -0700)]
nir/spirv: Add support for constants

8 years agonir/spirv: Add basic support for types
Jason Ekstrand [Wed, 29 Apr 2015 21:36:01 +0000 (14:36 -0700)]
nir/spirv: Add basic support for types

8 years agonir/types: Add more helpers for creating types
Jason Ekstrand [Wed, 29 Apr 2015 21:28:37 +0000 (14:28 -0700)]
nir/types: Add more helpers for creating types

8 years agoglsl/types: Expose the function_param and struct_field structs to C
Jason Ekstrand [Wed, 29 Apr 2015 21:48:12 +0000 (14:48 -0700)]
glsl/types: Expose the function_param and struct_field structs to C

Previously, they were hidden behind a #ifdef __cplusplus so C wouldn't find
them.  This commit simpliy moves the #ifdef and adds #ifdef's around
constructors.

8 years agoglsl/types: Add support for function types
Jason Ekstrand [Wed, 25 Feb 2015 00:29:33 +0000 (16:29 -0800)]
glsl/types: Add support for function types

8 years agoglsl: Add GLSL_TYPE_FUNCTION to the base types enums
Jason Ekstrand [Wed, 25 Feb 2015 00:27:32 +0000 (16:27 -0800)]
glsl: Add GLSL_TYPE_FUNCTION to the base types enums

8 years agonir/spirv: Rework the way values are added
Jason Ekstrand [Wed, 29 Apr 2015 21:34:06 +0000 (14:34 -0700)]
nir/spirv: Rework the way values are added

Instead of having functions to add values and set various things, we just
have a function that does a few asserts and then returns the value.  The
caller is then responsible for setting the various fields.

8 years agonir/spirv: Add stub support for extension instructions
Jason Ekstrand [Wed, 29 Apr 2015 21:32:55 +0000 (14:32 -0700)]
nir/spirv: Add stub support for extension instructions

8 years agoREVERT: Add a simple helper program for testing SPIR-V -> NIR translation
Jason Ekstrand [Wed, 29 Apr 2015 21:29:38 +0000 (14:29 -0700)]
REVERT: Add a simple helper program for testing SPIR-V -> NIR translation

8 years agoglsl/compiler: Move the error_no_memory stub to standalone_scaffolding.cpp
Jason Ekstrand [Wed, 29 Apr 2015 21:30:22 +0000 (14:30 -0700)]
glsl/compiler: Move the error_no_memory stub to standalone_scaffolding.cpp

8 years agonir: Add the start of a SPIR-V to NIR translator
Jason Ekstrand [Wed, 29 Apr 2015 00:43:16 +0000 (17:43 -0700)]
nir: Add the start of a SPIR-V to NIR translator

At the moment, it can handle the very basics of strings and can ignore
debug instructions.  It also has basic support for decorations.

8 years agonir: Import the revision 30 SPIR-V header from Khronos
Jason Ekstrand [Tue, 28 Apr 2015 04:13:44 +0000 (21:13 -0700)]
nir: Import the revision 30 SPIR-V header from Khronos

8 years agoMerge remote-tracking branch 'mesa-public/master' into vulkan
Jason Ekstrand [Mon, 31 Aug 2015 23:30:07 +0000 (16:30 -0700)]
Merge remote-tracking branch 'mesa-public/master' into vulkan

8 years agomesa/texformat: use format conversion function in _mesa_choose_tex_format
Nanley Chery [Wed, 12 Aug 2015 21:41:50 +0000 (14:41 -0700)]
mesa/texformat: use format conversion function in _mesa_choose_tex_format

This function's cases for non-generic compressed formats duplicate
the GL to MESA translation in _mesa_glenum_to_compressed_format().
This patch replaces the switch cases with a call to the translation
function. This change teaches this function about ASTC, thus enabling
ASTC for glTex*Storage*() calls.

Reviewed-by: Chad Versace <chad.versace@intel.com>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
8 years agomesa/texcompress: correct mapping of S3TC formats in conversion function
Nanley Chery [Wed, 26 Aug 2015 19:01:38 +0000 (12:01 -0700)]
mesa/texcompress: correct mapping of S3TC formats in conversion function

MESA_FORMAT_RGBA_DXT5 should actually be reserved for GL_RGBA[4]_DXT5_S3TC.
Also, Gallium and other dri drivers (radeon and nouveau) follow this mapping
scheme.

Reviewed-by: Chad Versace <chad.versace@intel.com>
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
8 years agor600/sb: update last_cf for finalize if.
Dave Airlie [Mon, 31 Aug 2015 04:22:23 +0000 (14:22 +1000)]
r600/sb: update last_cf for finalize if.

As Glenn did for finalize_loop we need to update_cf when we
add a POP at the end of a shader.

I think this fixes one of the earlier shader going off end
of memory problems we've stopped.

Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
Cc: "10.6" "11.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agoi965/fs: Use greater-equal cmod to implement maximum.
Matt Turner [Sat, 29 Aug 2015 00:10:00 +0000 (17:10 -0700)]
i965/fs: Use greater-equal cmod to implement maximum.

The docs specifically call out SEL with .l and .ge as the
implementations of MIN and MAX respectively. Among other things,
SEL with these conditional mods are commutative.

See commit 3b7f683f.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>