summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* nir/spirv: Set a default number of invocations for geometry shadersJason Ekstrand2016-03-291-0/+3
| | | | | | The SPIR-V spec says geometry shaders are supposed to have one invocation by default. The execution mode is only required if there are multiple invocations.
* anv/gen7: Fix command parser version test with indirect dispatchJordan Justen2016-03-281-1/+1
| | | | | Caught-by: Ilia Mirkin <[email protected]> Signed-off-by: Jordan Justen <[email protected]>
* anv/gen7: DispatchIndirect requires cmd parser 5Jordan Justen2016-03-281-0/+26
| | | | Signed-off-by: Jordan Justen <[email protected]>
* anv/gen7: Save kernel command parser versionJordan Justen2016-03-282-0/+12
| | | | Signed-off-by: Jordan Justen <[email protected]>
* anv: Invalidate state cache before L3 partitioning set-up.Jordan Justen2016-03-282-0/+2
| | | | | | Port 10d84ba9f084174a1e8e7639dfb05dd855ba86e8 to anv. Signed-off-by: Jordan Justen <[email protected]>
* anv: Fix cache pollution race during L3 partitioning set-up.Jordan Justen2016-03-282-20/+52
| | | | | | Port 0aa4f99f562a05880a779707cbcd46be459863bf to anv. Signed-off-by: Jordan Justen <[email protected]>
* nir/spirv: Remove the NoContraction hackJason Ekstrand2016-03-281-22/+1
| | | | | NIR now just handles this for us by not fusing if the multiply is marked as exact.
* i965/peephole_ffma: Only match a mul+add if none of the ops are exactJason Ekstrand2016-03-281-0/+11
|
* nir/search: Don't match inexact expressions with exact subexpressionsJason Ekstrand2016-03-281-5/+18
| | | | | | | | | | | | | | | | | | In the first pass of implementing exact handling, I made a mistake with search-and-replace. In particular, we only reallly handled exact/inexact on the root of the tree. Instead, we need to check every node in the tree for an exact/inexact match. As an example of this, consider the following GLSL code precise float a = b + c; if (a < 0) { do_stuff(); } In that case, only the add will be declared "exact" and an expression that looks for "b + c < 0" will still match and replace it with "b < -c" which may yield different results. The solution is to simply bail if any of the values are exact when matching an inexact expression.
* i965: Allow mul+add fusing againJason Ekstrand2016-03-251-1/+1
|
* spirv/alu: Add support for the NoContraction decorationJason Ekstrand2016-03-251-16/+53
|
* spirv/glsl: Add a helper for converting glsl opcodes into nir opcodesJason Ekstrand2016-03-251-61/+56
| | | | This is similar to the way that regular ALU operations are handled.
* nir/spirv: Get rid of the spirv2nir helper binaryJason Ekstrand2016-03-252-70/+1
| | | | | This was useful once upon a time but now that we have a real Vulkan driver to run our SPIR-V binaries through, there's really no point.
* anv/blit2d: Add a function to create an ImageViewNanley Chery2016-03-251-113/+83
| | | | | | | | | This function differs from the open-coded implementation in that the ImageView's width is determined by the caller and is not unconditionally set to match the number of texels within the surface's pitch. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/image: Enable specifying a surface's minimum pitchNanley Chery2016-03-251-1/+1
| | | | | | | | | | | | | This is required to create multiple, horizontally adjacent, max-width images from one blit2d surface. This is also required for more accurate width specification of surfaces within a larger surface (which is seen as the smaller surface's enclosing region). Note that anv_image_create_info::stride has been unused since commit, b36938964063a4072abfd779f5607743dbc3b6f1 . Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/vec4: Get rid of a stray predicate inverse in opquantizef16Jason Ekstrand2016-03-251-1/+0
| | | | This fixes 30 opquantize CTS tests on HSW
* nir/algebraic: Get rid of a redundant copy of fdiv loweringJason Ekstrand2016-03-251-1/+0
|
* nir/algebraic: Add better lowering of ldexpJason Ekstrand2016-03-251-2/+27
|
* nir/builder: Simplify nir_ssa_undef a bitJason Ekstrand2016-03-251-2/+1
|
* nir/spirv: Use the nir_ssa_undef helper from nir_builderJason Ekstrand2016-03-251-9/+4
|
* nir/builder: Add a bit size field to nir_ssa_undefJason Ekstrand2016-03-252-3/+4
|
* nir: Add a better comment for INTRINSIC_RANGEJason Ekstrand2016-03-251-2/+2
|
* nir/glsl: Stop carying a pointer to the nir_shader in the visitorJason Ekstrand2016-03-251-6/+3
|
* anv: Use genxml register support for L3 Cache configJordan Justen2016-03-252-38/+48
| | | | | | | The programming of the L3 Cache registers should match the previous manually packed LRI values. Signed-off-by: Jordan Justen <[email protected]>
* genxml: Add L3 Cache Control register definitionsJordan Justen2016-03-244-0/+69
| | | | | | Based on intel_reg.h (5912da45a69923afa1b7f2eb5bb371d848813c41) Signed-off-by: Jordan Justen <[email protected]>
* anv: Add genxml register supportJordan Justen2016-03-241-0/+9
| | | | Signed-off-by: Jordan Justen <[email protected]>
* genxml: Add register supportJordan Justen2016-03-241-19/+43
| | | | Signed-off-by: Jordan Justen <[email protected]>
* Merge remote-tracking branch 'public/master' into vulkanJason Ekstrand2016-03-24261-3431/+4704
|\
| * nir: Add a pass to inline functionsJason Ekstrand2016-03-244-0/+274
| | | | | | | | | | | | | | This commit adds a new NIR pass that lowers all function calls away by inlining the functions. Reviewed-by: Jordan Justen <[email protected]>
| * nir/builder: Add helpers for easily inserting copy_var intrinsicsJason Ekstrand2016-03-241-0/+23
| | | | | | | | Reviewed-by: Jordan Justen <[email protected]>
| * nir: Add return lowering passJason Ekstrand2016-03-244-0/+251
| | | | | | | | | | | | | | | | This commit adds a NIR pass for lowering away returns in functions. If the return is in a loop, it is lowered to a break. If it is not in a loop, it's lowered away by moving/deleting code as needed. Reviewed-by: Jordan Justen <[email protected]>
| * nir: Add a cursor helper for getting a cursor after any phi nodesJason Ekstrand2016-03-241-0/+16
| | | | | | | | Reviewed-by: Jordan Justen <[email protected]>
| * nir/builder: Add a helper for inserting jump instructionsJason Ekstrand2016-03-241-0/+7
| | | | | | | | Reviewed-by: Jordan Justen <[email protected]>
| * nir/cf: Make extracting or re-inserting nothing a no-opJason Ekstrand2016-03-241-0/+9
| | | | | | | | | | Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
| * nir: Add a function for comparing cursorsJason Ekstrand2016-03-242-0/+58
| | | | | | | | Reviewed-by: Jordan Justen <[email protected]>
| * nir/cf: Handle relinking top-level blocksJason Ekstrand2016-03-241-2/+5
| | | | | | | | | | | | | | | | This can happen if a function ends in a return instruction and you remove the return. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
| * nir: Add a pass to repair SSA formJason Ekstrand2016-03-244-0/+163
| | | | | | | | Reviewed-by: Jordan Justen <[email protected]>
| * nir/vars_to_ssa: Use the new nir_phi_builder helperJason Ekstrand2016-03-241-359/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The efficiency should be approximately the same. We do a little more work per phi node because we have to sort the predecessors. However, we no longer have to walk the blocks a second time to pop things off the stack. The bigger advantage, however, is that we can now re-use the phi placement and per-block SSA value tracking in other passes. As a side-benifit, the phi builder actually handles unreachable blocks correctly. The original vars_to_ssa code, because of the way it iterated the blocks and added phi sources, didn't add sources corresponding to predecessors of unreachable blocks. The new strategy employed by the phi builder creates a phi source for each predecessor and should correctly handle unreachable blocks by setting those sources to SSA undefs. Reviewed-by: Jordan Justen <[email protected]>
| * nir/dominance: Handle unreachable blocksJason Ekstrand2016-03-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, nir_dominance.c didn't properly handle unreachable blocks. This can happen if, for instance, you have something like this: loop { if (...) { break; } else { break; } } In this case, the block right after the if statement will be unreachable. This commit makes two changes to handle this. First, it removes an assert and allows block->imm_dom to be null if the block is unreachable. Second, it properly skips unreachable blocks in calc_dom_frontier_cb. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Connor Abbott <[email protected]>
| * nir: Add a phi node placement helperJason Ekstrand2016-03-244-0/+414
| | | | | | | | | | | | | | | | | | | | | | Right now, we have phi placement code in two places and there are other places where it would be nice to be able to do this analysis. Instead of repeating it all over the place, this commit adds a helper for placing all of the needed phi nodes for a value. v2: Add better documentation Reviewed-by: Jordan Justen <[email protected]>
| * util/bitset: Allow iterating over const bitsetsJason Ekstrand2016-03-241-1/+1
| | | | | | | | Reviewed-by: Jordan Justen <[email protected]>
| * ttn: remove stray global from headerRob Clark2016-03-241-2/+0
| | | | | | | | Signed-off-by: Rob Clark <[email protected]>
| * nv50/ir: silence unhandled TGSI_PROPERTY_NEXT_SHADER infoSamuel Pitoiset2016-03-241-0/+3
| | | | | | | | | | | | | | | | radeonsi uses this property to make the best decision about which shader to compile, but this is not currently used by our codegen. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
| * mesa: Handle negative length in glPushDebugGroup().Kenneth Graunke2016-03-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The KHR_debug spec doesn't actually say we should handle this, but that is most likely an oversight - it says to check against strlen and generate errors if length is negative. It appears they just forgot to explicitly spell out that we should then proceed to actually handle it. Fixes crashes from uncaught std::string exceptions in many dEQP-GLES31.functional.debug.error_filters.* tests. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
| * mesa: Make glDebugMessageInsert deal with negative length for all types.Kenneth Graunke2016-03-241-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the KHR_debug spec, section 5.5.5 (Externally Generated Messages): "If <length> is negative, it is implied that <buf> contains a null terminated string. The error INVALID_VALUE will be generated if the number of characters in <buf>, excluding the null terminator when <length> is negative, is not less than the value of MAX_DEBUG_MESSAGE_LENGTH." This indicates that length should be set to strlen for all types, not just GL_DEBUG_TYPE_MARKER. We want it to be after validate_length() so we still generate appropriate errors. Fixes crashes from uncaught std::string exceptions in many dEQP-GLES31.functional.debug.error_filters.* tests. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
| * mesa: Include null terminator in GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH.Kenneth Graunke2016-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the KHR_debug spec: "Applications can query the number of messages currently in the log by obtaining the value of DEBUG_LOGGED_MESSAGES, and the string length (including its null terminator) of the oldest message in the log through the value of DEBUG_NEXT_LOGGED_MESSAGE_LENGTH." Because we weren't including the null terminator, many dEQP tests called glGetDebugMessageLog with a bufSize parameter that was 1 too small, and unable to contain the message, so we skipped returning it, failing many cases. Fixes 298 dEQP-GLES31.functional.debug.* tests. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Stephane Marchesin <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
| * st/mesa: use RGBA instead of BGRA for SRGB_ALPHANicolai Hähnle2016-03-241-1/+1
| | | | | | | | | | | | | | | | | | This fixes a regression introduced by commit a8eea696 "st/mesa: honour sized internal formats in st_choose_format (v2)". Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94657 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94671 Reviewed-by: Marek Olšák <[email protected]>
| * radeonsi: silence a coverity warningNicolai Hähnle2016-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following Coverity warning 5378 tmpl.fetch_args = atomic_fetch_args; 5379 tmpl.emit = atomic_emit; >>> CID 1357115: Uninitialized variables (UNINIT) >>> Using uninitialized value "tmpl". Field "tmpl.intr_name" is uninitialized. 5380 bld_base->op_actions[TGSI_OPCODE_ATOMUADD] = tmpl; 5381 bld_base->op_actions[TGSI_OPCODE_ATOMUADD].intr_name = "add"; ... is a false positive, but what the hell. This change should "fix" it. Reviewed-by: Marek Olšák <[email protected]>
| * mesa: replace gl_context->Multisample._Enabled with ↵Bas Nieuwenhuizen2016-03-2414-36/+43
| | | | | | | | | | | | | | | | | | | | | | | | _mesa_is_multisample_enabled. This removes any dependency on driver validation of the number of framebuffer samples. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Brian Paul <[email protected]>
| * nir: fix dangling ssadef->name ptrsRob Clark2016-03-243-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many places, the convention is to pass an existing ssadef name ptr when construction/initializing a new nir_ssa_def. But that goes badly (as noticed by garbage in nir_print output) when the original string gets freed. Just use ralloc_strdup() instead, and add ralloc_free() in the two places that would care (not that the strings wouldn't eventually get freed anyways). Also fixup the nir_search code which was directly setting ssadef->name to use the parent instruction as memctx. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>