summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* swr: [rasterizer core] don't assume linux is 64-bitTim Rowley2016-03-251-2/+1
|
* swr: [rasterizer common] remove old unused win32 typesTim Rowley2016-03-251-6/+0
|
* swr: [rasterizer jitter] vpermps supportTim Rowley2016-03-254-1/+84
|
* swr: [rasterizer] Add rdtsc buckets support for shadersTim Rowley2016-03-256-3/+75
| | | | | | | | | | | Pass pointer to core buckets mgr back to sim layer. Add support for RDTSC_START/RDTSC_STOP macros in the builder. Each unique shader now has a unique bucket associated with it, enabling more detailed reporting at the shader level. Currently due to some llvm issue with thread local storage, 64bit runs require single threaded mode.
* swr: [rasterizer core] backend reorganizationTim Rowley2016-03-258-256/+276
|
* swr: [rasterizer core] store blend output in temporary instead of PS output.Tim Rowley2016-03-251-5/+10
| | | | Fixes additive blend problem with MSAA
* swr: [rasterizer core] Move InitializeHotTiles and corresponding clear code ↵Tim Rowley2016-03-253-254/+258
| | | | out of threads.cpp.
* swr: [rasterizer jitter] Cleanup use of types inside of Builder.Tim Rowley2016-03-254-63/+75
| | | | | Also, cached the simd width since we don't have to keep querying the JitManager for it.
* swr: [rasterizer jitter] Fix type mismatch on select args for SCATTERPSTim Rowley2016-03-251-2/+4
|
* swr: [rasterizer core] fix rasterizing multisampling with scissor enabledTim Rowley2016-03-251-42/+28
| | | | We were not evaluating the scissor edge equations at sample positions.
* swr: [rasterizer core] RingBuffer class for DC/DSTim Rowley2016-03-256-136/+180
| | | | | | | | | | | | | Use head/tail ring buffer indices for thread synchronization. 1. SwrWaitForIdle loops until ring is empty. (head == tail) 2. GetDrawContext waits until ring is not full. (head - tail) == Ring Size 3. Draw enqueues by incrementing head. 4. Last worker thread to move past a DC dequeues by incrementing tail. Todo: To reduce contention we can cache the tail in the API thread. For example, if you know you have 64 free entries in the ring then you don't need to keep checking the tail until you used those 64 entries.
* swr: [rasterizer] switch assert uses to SWR_ASSERTTim Rowley2016-03-251-5/+5
|
* swr: [rasterizer core] Split all RECT_LIST draws into 1 RECT per drawTim Rowley2016-03-251-0/+5
| | | | Needed until proper RECT_LIST PrimAssembly code is written.
* swr: [rasterizer] Add string knob typeTim Rowley2016-03-252-1/+10
|
* radeon/vce: disable two pipe mode for Polaris11Sonny Jiang2016-03-241-1/+2
| | | | | Signed-off-by: Sonny Jiang <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* radeon/vce: add Polaris11 VCE firmware supportSonny Jiang2016-03-241-0/+3
| | | | Signed-off-by: Sonny Jiang <[email protected]>
* radeonsi: add support for Polaris (v2)Sonny Jiang2016-03-245-0/+29
| | | | | | | | | v2: Polaris chips should be defined after Stoney Signed-off-by: Sonny Jiang <[email protected]> (v1) Reviewed-by: Michel Dänzer <[email protected]> (v1) Signed-off-by: Leo Liu <[email protected]> (v2 diff) Reviewed-by: Alex Deucher <[email protected]> (v2 diff)
* winsys/amdgpu: addrlib - add Polaris support (v2)Sonny Jiang2016-03-243-2/+18
| | | | | | | | v2: fix indentation as noted by Michel Signed-off-by: Sonny Jiang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* mesa: Check glReadBuffer enums against the ES3 table.Kenneth Graunke2016-03-241-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | From the ES 3.2 spec, section 16.1.1 (Selecting Buffers for Reading): "An INVALID_ENUM error is generated if src is not BACK or one of the values from table 15.5." Table 15.5 contains NONE and COLOR_ATTACHMENTi. Mesa properly returned INVALID_ENUM for unknown enums, but it decided what was known by using read_buffer_enum_to_index, which handles all enums in every API. So enums that were valid in GL were making it past the "valid enum" check. Such targets would then be classified as unsupported, and we'd raise INVALID_OPERATION, but that's technically the wrong error code. Fixes dEQP-GLES31's functional.debug.negative_coverage.get_error.buffer.read_buffer v2: Only call read_buffer_enuM_to_index when required (Eduardo). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
* 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]>
* glsl: Add propagate_invariance to the other makefileJason Ekstrand2016-03-231-0/+1
| | | | This fixes the scons build
* nir/glsl: Propagate invariant into NIR alu opsJason Ekstrand2016-03-231-0/+3
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* glsl/rebalance_tree: Don't handle invariant or precise treesJason Ekstrand2016-03-231-0/+16
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* glsl/opt_algebraic: Don't handle invariant or precise treesJason Ekstrand2016-03-231-0/+19
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* glsl: Add a pass to propagate the "invariant" and "precise" qualifiersJason Ekstrand2016-03-234-0/+128
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* nir/alu_to_scalar: Propagate the "exact" bitJason Ekstrand2016-03-231-0/+1
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* i965/peephole_ffma: Don't fuse exact addsJason Ekstrand2016-03-231-1/+3
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* nir/cse: Properly handle nir_ssa_def.exactJason Ekstrand2016-03-231-2/+14
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* nir/algebraic: Flag inexact optimizationsJason Ekstrand2016-03-231-59/+62
| | | | | | | | | | Many of our optimizations, while great for cutting shaders down to size, aren't really precision-safe. This commit tries to flag all of the inexact floating-point optimizations so they don't get run on values that are flagged "exact". It's a bit conservative and maybe flags some safe optimizations as unsafe but that's better than missing one. Reviewed-by: Francisco Jerez <[email protected]>