summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv
Commit message (Collapse)AuthorAgeFilesLines
* spirv: Mark default cases unreachable().Matt Turner2016-05-251-0/+2
| | | | | Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* nir/spirv: Handle location decorations on structure membersJason Ekstrand2016-05-241-20/+28
|
* nir/spirv: Add explicit handling for all decorationsJason Ekstrand2016-05-242-17/+110
| | | | | | | From time to time we have had cases where glslang has added a decoration we don't handle and it has caused problems. This audit ensures that, for every decoration, we either handle it or hit an unreachable() with an accurate description of why we don't have to.
* spirv: Handle the PixelCenterInteger execution mode.Kenneth Graunke2016-05-203-0/+7
| | | | | | | | | This isn't allowed by Vulkan, but might be useful someday for SPIR-V in OpenGL (if that ever becomes a thing). It's easy enough to hook up, and as precedent, we already do so for OriginLowerLeft. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir/spirv: Handle the NonReadable decoration on struct membersJason Ekstrand2016-05-191-0/+1
|
* spirv: add switch case for nir_texop_txf_ms_mcs in vtn_handle_texture()Brian Paul2016-05-181-0/+2
| | | | | | | | | | | Mark it as unreachable. Silences a compiler warning: spirv/spirv_to_nir.c:1397:4: warning: enumeration value 'nir_texop_txf_ms_mcs' not handled in switch [-Wswitch] switch (instr->op) { ^ Reviewed-by: Jason Ekstrand <[email protected]>
* spirv: Properly size the src[] array.Matt Turner2016-05-181-1/+1
| | | | | | | Operations like nir_op_bitfield_insert have four arguments, and Coverity isn't privy to the fact that 4-argument operations aren't possible here, so it thinks this can lead to memory corruption. Just increase the size of the array to quell any fears.
* nir: glsl_get_bit_size() should take glsl_typeRob Clark2016-05-122-5/+5
| | | | | | | | It's what all the call-sites once, so gets rid of a bunch of inlined glsl_get_base_type() at the call-sites. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* spirv: Fix structure splitting with per-vertex interface arrays.Kenneth Graunke2016-05-071-1/+2
| | | | | | | | | | | | | | | | | | | We want to use interface_type, not vtn_var->type. They're normally equivalent, but for geometry/tessellation per-vertex interface arrays, we need to unwrap a level. Otherwise, we tried to iterate a structure members but instead used an array length. If the array length was longer than the number of fields in the structure, we'd crash. Fixes the CreatePipelineGeometryInputBlockPositive layer validation test. v2: Just use glsl_without_array() on the vtn_var type (requested by Jason Ekstrand). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* spirv: fix warning in release buildGrazvydas Ignotas2016-04-251-1/+1
| | | | | | | | Mark variable MAYBE_UNUSED to avoid unused-but-set-variable warning in release build. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* spirv: Trivially handle the NonWriteable decorationJason Ekstrand2016-04-202-0/+4
| | | | Signed-off-by: Jason Ekstrand <[email protected]>
* spirv: Move to compiler/Jason Ekstrand2016-04-149-0/+7568
While it does rely on NIR, it's not really part of the NIR core. At the moment, it still builds as part of libnir but that can be changed later if desired.