summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* nir/spirv: Improve handling of variable loads and copiesJason Ekstrand2016-01-211-26/+128
| | | | | | | Before we were asuming that a deref would either be something in a block or something that we could pass off to NIR directly. However, it is possible that someone would choose to load/store/copy a split structure all in one go. We need to be able to handle that.
* nir/spirv: Make vectors a proper array time with an array_elementJason Ekstrand2016-01-212-24/+6
| | | | This makes dealing with single-component derefs easier
* nir/spirv: Rework access chains a bit to allow for literalsJason Ekstrand2016-01-212-37/+75
| | | | | This makes them much easier to construct because you can also just specify a literal number and it doesn't have to be a valid SPIR-V id.
* vtn/variables: Compact local loads/stores into one functionJason Ekstrand2016-01-211-99/+42
| | | | This is similar to what we did for block loads/stores.
* nir/spirv: Add an actual variable struct to spirv_to_nirJason Ekstrand2016-01-214-310/+340
| | | | | This allows us, among other things, to do structure splitting on-the-fly to more correctly handle input/output structs.
* nir/spirv: Split variable handling out into its own fileJason Ekstrand2016-01-214-1303/+1337
| | | | It's 1300 lines all by itself and it will only grow.
* nir/spirv: Rework access chainsJason Ekstrand2016-01-214-365/+447
| | | | | | | Previously, we were creating nir_deref's immediately. Now, instead, we have an intermediate vtn_access_chain structure. While a little more awkward initially, this will allow us to more easily do structure splitting on-the-fly.
* nir/spirv: Implement ModfStruct opcode.Kenneth Graunke2016-01-211-1/+7
|
* nir/spirv: Delete stray fmod remnants.Kenneth Graunke2016-01-211-1/+0
| | | | | Jason left these stray code fragments in 22804de110b97dce1415318fd02c1003e16ef14a.
* vk: Do render cache flush for GEN8+Kristian Høgsberg Kristensen2016-01-211-2/+2
| | | | This is needed for SKL as well.
* vk: Emit surface state base address before renderpassKristian Høgsberg Kristensen2016-01-211-2/+2
| | | | | | | If we're continuing a render pass, make sure we don't emit the depth and stencil buffer addresses before we set the state base addresses. Fixes crucible func.cmd-buffer.small-secondaries
* vk: Fix indirect push constantsKristian Høgsberg Kristensen2016-01-213-39/+15
| | | | | | | This currently sets the base and size of all push constants to the entire push constant block. The idea is that we'll use the base and size to eventually optimize the amount we actually push, but for now we don't do that.
* Merge remote-tracking branch 'jekstrand/wip/i965-uniforms' into vulkanKristian Høgsberg Kristensen2016-01-2115-229/+313
|\
| * i965/fs: Push small uniform arraysJason Ekstrand2015-12-141-23/+53
| | | | | | | | | | | | | | | | | | | | Unfortunately, this also means that we need to use a slightly different algorithm for assign_constant_locations. The old algorithm worked based on the assumption that each read of a uniform value read exactly one float. If it encountered a MOV_INDIRECT, it would immediately bail and push the whole thing. Since we can now read ranges using MOV_INDIRECT, we need to be able to push a series of floats without breaking them up. To do this, we use an algorithm similar to the on in split_virtual_grfs.
| * i965/fs: Rename demote_pull_constants to lower_constant_loadsJason Ekstrand2015-12-142-3/+3
| |
| * i965/vec4: Get rid of the uniform_size arrayJason Ekstrand2015-12-145-31/+0
| |
| * i965/fs: Use UD type for offsets in VARYING_PULL_CONSTANT_LOADJason Ekstrand2015-12-141-1/+1
| |
| * i965/vec4: Use MOV_INDIRECT instead of reladdr for indirect push constantsJason Ekstrand2015-12-144-51/+50
| | | | | | | | | | | | | | | | | | | | | | | | This commit moves us to an instruction based model rather than a register-based model for indirects. This is more accurate anyway as we have to emit instructions to resolve the reladdr. It's also a lot simpler because it gets rid of the recursive reladdr problem by design. One side-effect of this is that we need a whole new algorithm in move_uniform_array_access_to_pull_constants. This new algorithm is much more straightforward than the old one and is fairly similar to what we're already doing in the FS backend.
| * i965/vec4: Inline get_pull_constant_offsetJason Ekstrand2015-12-142-25/+14
| | | | | | | | It's not really doing enough anymore to justify a helper function.
| * i965/fs: Get rid of the param_size arrayJason Ekstrand2015-12-144-15/+0
| |
| * i965/fs: Stop relying on param_size in assign_constant_locationsJason Ekstrand2015-12-141-27/+17
| | | | | | | | | | | | | | | | | | | | Now that we have MOV_INDIRECT opcodes, we have all of the size information we need directly in the opcode. With a little restructuring of the algorithm used in assign_constant_locations we don't need param_size anymore. The big thing to watch out for now, however, is that you can have two ranges overlap where neither contains the other. In order to deal with this, we make the first pass just flag what needs pulling and handle assigning pull constant locations until later.
| * i965/fs: Get rid of reladdrJason Ekstrand2015-12-142-10/+2
| | | | | | | | We aren't using it anymore.
| * i965/fs: Use MOV_INDIRECT for all indirect uniform loadsJason Ekstrand2015-12-142-39/+87
| | | | | | | | | | | | | | | | Instead of using reladdr, this commit changes the FS backend to emit a MOV_INDIRECT whenever we need an indirect uniform load. We also have to rework some of the other bits of the backend to handle this new form of uniform load. The obvious change is that demote_pull_constants now acts more like a lowering pass when it hits a MOV_INDIRECT.
| * nir: Add another index to load_uniform to specify the range readJason Ekstrand2015-12-142-2/+10
| |
| * i965/vec4: Add support for SHADER_OPCODE_MOV_INDIRECTJason Ekstrand2015-12-141-0/+45
| |
| * i965/fs: Add support for MOV_INDIRECT on pre-Broadwell hardwareJason Ekstrand2015-12-142-13/+42
| | | | | | | | | | | | | | While we're at it, we also add support for the possibility that the indirect is, in fact, a constant. This shouldn't happen in the common case (if it does, that means NIR failed to constant-fold something), but it's possible so we should handle it.
| * i965/fs: Fix regs_read() for MOV_INDIRECT with a non-zero subnrJason Ekstrand2015-12-141-1/+1
| | | | | | | | The subnr field is in bytes so we don't need to multiply by type_sz.
| * i965/fs: Don't force MASK_DISABLE on INDIRECT_MOV instructionsJason Ekstrand2015-12-141-1/+0
| | | | | | | | It should work fine without it and the visitor can set it if it wants.
| * i965/fs: Add support for doing MOV_INDIRECT on uniformsJason Ekstrand2015-12-141-1/+4
| |
* | nir/spirv: Handle compute shared atomicsJordan Justen2016-01-211-44/+96
| | | | | | | | Signed-off-by: Jordan Justen <[email protected]>
* | nir/spirv: Support workgroup (shared) variable translationJordan Justen2016-01-211-0/+2
| | | | | | | | Signed-off-by: Jordan Justen <[email protected]>
* | anv/gen8: Set SLM size in interface descriptorJordan Justen2016-01-211-0/+11
| | | | | | | | Signed-off-by: Jordan Justen <[email protected]>
* | anv/gen8+9: Invalidate color calc state when switching to the GPGPU pipelineJordan Justen2016-01-211-0/+14
| | | | | | | | | | | | Port 044acb9256046bebec890cac7e42043754459fc2 to anv. Signed-off-by: Jordan Justen <[email protected]>
* | anv/gen8: Enable SLM in L3 cache control registerJordan Justen2016-01-212-17/+69
| | | | | | | | Signed-off-by: Jordan Justen <[email protected]>
* | anv/pipeline: Set size of shared variables in prog_dataJordan Justen2016-01-211-0/+2
| | | | | | | | Signed-off-by: Jordan Justen <[email protected]>
* | i965/nir: Lower nir compute shader shared variablesJordan Justen2016-01-211-0/+10
| | | | | | | | Signed-off-by: Jordan Justen <[email protected]>
* | nir: Lower shared var atomics during nir_lower_ioJordan Justen2016-01-211-2/+84
| | | | | | | | Signed-off-by: Jordan Justen <[email protected]>
* | nir: Add support for lowering load/stores of shared variablesJordan Justen2016-01-215-8/+32
| | | | | | | | Signed-off-by: Jordan Justen <[email protected]>
* | nir: Add atomic operations on variablesJordan Justen2016-01-211-0/+27
| | | | | | | | | | | | | | | | This allows us to first generate atomic operations for shared variables using these opcodes, and then later we can lower those to the shared atomics intrinsics with nir_lower_io. Signed-off-by: Jordan Justen <[email protected]>
* | nir: Add compute shader shared variable storage classJordan Justen2016-01-217-2/+25
| | | | | | | | | | | | | | | | Previously we were receiving shared variable accesses via a lowered intrinsic function from glsl. This change allows us to send in variables instead. For example, when converting from SPIR-V. Signed-off-by: Jordan Justen <[email protected]>
* | nir/print: Add space after shader_storage var modeJordan Justen2016-01-211-1/+1
| | | | | | | | Signed-off-by: Jordan Justen <[email protected]>
* | i965/fs/nir: Move shared variable load/store to nir_emit_cs_intrinsicJordan Justen2016-01-211-76/+76
| | | | | | | | Signed-off-by: Jordan Justen <[email protected]>
* | anv/image: Stop including gen8_pack.h in common fileChad Versace2016-01-201-5/+0
| |
* | isl: Add a READMEChad Versace2016-01-202-81/+114
| | | | | | | | Most of the file-level comment in isl.h is moved to the README.
* | vk: Make maxSamplerAllocationCount more reasonableKristian Høgsberg Kristensen2016-01-201-1/+1
| | | | | | | | We can't allocate 4 billion samplers. Let's go with 64k.
* | vk/tests: Add stub for anv_gem_get_bit6_swizzle()Kristian Høgsberg Kristensen2016-01-201-0/+6
| |
* | vk/tests: Add isl include pathKristian Høgsberg Kristensen2016-01-201-0/+1
| |
* | nir/spirv/glsl450: Use fabs not iabs in ldexp.Kenneth Graunke2016-01-201-1/+1
| | | | | | | | This was just wrong.
* | isl: Add ish.h to libsil_la_SOURCESKristian Høgsberg Kristensen2016-01-201-0/+1
| |
* | nir/spirv/glsl450: Implement FrexpStructJason Ekstrand2016-01-201-1/+7
| |