aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* anv/dynamic_offsets: Fix the order of arguments to nir_build_immJason Ekstrand2016-04-281-2/+2
|
* anv: Fix a build error caused by recent fp64 NIR changesJason Ekstrand2016-04-281-2/+3
|
* nir: Try to warn when C99 extensions are used in nir headers.Jose Fonseca2016-04-281-1/+22
| | | | | | | | | | | | | | Ideally we'd have nir.h being included with -Wpedantic too, but it fails with: src/compiler/nir/nir.h:754:20: warning: ISO C++ forbids zero-size array ‘src’ [-Wpedantic] nir_alu_src src[]; ^ In file included from src/compiler/nir/glsl_to_nir.cpp:42:0: src/compiler/nir/nir.h:919:16: warning: ISO C++ forbids zero-size array ‘src’ [-Wpedantic] nir_src src[]; Reviewed-by: Connor Abbott <[email protected]>
* nir: Remove spurious ; after nir_builder functions.Jose Fonseca2016-04-281-1/+1
| | | | | | Makes -pedantic happy. Reviewed-by: Connor Abbott <[email protected]>
* nir: Remove spurious ; after namespace.Jose Fonseca2016-04-281-1/+1
| | | | | | Makes -pedantic happy. Reviewed-by: Connor Abbott <[email protected]>
* nir: Avoid C99 field initializers.Jose Fonseca2016-04-281-3/+6
| | | | | | | | | As they are not standard C++ and are not supported by MSVC C++ compiler. Just have nir_imm_double match nir_imm_float above. Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]>
* gallium/util: s/Elements/ARRAY_SIZE/Brian Paul2016-04-289-25/+25
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: improve comment on _mesa_check_disallowed_mapping(), return boolBrian Paul2016-04-281-2/+8
| | | | | | | | The old comment was a bit terse. Also, change the function return type to bool. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* radeonsi: remove needless cache flushes at the end of CP DMA operationsMarek Olšák2016-04-281-8/+0
| | | | | | not needed AFAIK Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: remove flushes at the beginning and end of IBs done by the kernelMarek Olšák2016-04-281-12/+12
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* nir: Add lrp lowering for doubles in opt_algebraicSamuel Iglesias Gonsálvez2016-04-282-3/+8
| | | | | | | | | | | | | | | Some hardware (i965 on Broadwell generation, for example) does not support natively the execution of lrp instruction with double arguments. Add 'lower_flrp64' flag to lower this instruction in that case. v2: - Rename lower_flrp_double to lower_flrp64 (Jason) - Fix typo (Jason) - Adapt the code to define bit_size information in the opcodes. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: rename lower_flrp to lower_flrp32Samuel Iglesias Gonsálvez2016-04-285-10/+10
| | | | | | | A later patch will add lower_flrp64 option to NIR. Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_double_ops: lower round_even()Iago Toral Quiroga2016-04-282-1/+60
| | | | | | At least i965 hardware does not have native support for round_even() on doubles. Reviewed-by: Matt Turner <[email protected]>
* nir/lower_double_ops: lower fract()Iago Toral Quiroga2016-04-282-0/+15
| | | | | | At least i965 hardware does not have native support for fract() on doubles. Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_double_ops: lower ceil()Iago Toral Quiroga2016-04-282-0/+24
| | | | | | | | | | At least i965 hardware does not have native support for ceil on doubles. v2 (Sam): - Improve the lowering pass to remove one bcsel (Jason). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_double_ops: lower floor()Iago Toral Quiroga2016-04-282-0/+26
| | | | | | | | | | At least i965 hardware does not have native support for floor on doubles. v2 (Sam): - Improve the lowering pass to remove one bcsel (Jason) Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_double_ops: lower trunc()Iago Toral Quiroga2016-04-282-0/+61
| | | | | | | | | | At least i965 hardware does not have native support for truncating doubles. v2: - Simplified the implementation significantly. - Fixed the else branch, that was not doing what we wanted. Reviewed-by: Jason Ekstrand <[email protected]>
* nir: add a pass to lower some double operationsConnor Abbott2016-04-283-0/+392
| | | | | | | | | | | | v2: Move to compiler/nir (Iago) v3: Use nir_imm_int() to load the constants (Sam) v4 (Sam): - Undo line-wrap (Jason). - Fix comment (Jason). - Improve generated code for get_signed_inf() function (Connor). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir/builder: add nir_imm_double()Connor Abbott2016-04-281-0/+8
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/builder: Add bit_size info to nir_build_imm()Samuel Iglesias Gonsálvez2016-04-283-8/+9
| | | | | | | | v2: - Group num_components and bit_size together (Jason) Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* radeonsi: check if value is negativeJakob Sinclair2016-04-281-1/+4
| | | | | | | | | | | Fixes a Coverity defect by adding checks to see if a value is negative before using it to index an array. By checking the value first it makes the code a bit safer but overall should not have a big impact. CID: 1355598 Signed-off-by: Jakob Sinclair <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* clover: Fix build against clang SVN >= r267772Michel Dänzer2016-04-281-0/+3
| | | | | | | | (Re-pushing previous fix for clang SVN r265359, which was reverted in the meantime) Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* glsl: fix lowering outputs for early/nested returnsLars Hamre2016-04-281-4/+54
| | | | | | | | | | | | | Return statements in conditional blocks were not having their output varyings lowered correctly. This patch fixes the following piglit tests: /spec/glsl-1.10/execution/vs-float-main-return /spec/glsl-1.10/execution/vs-vec2-main-return /spec/glsl-1.10/execution/vs-vec3-main-return Signed-off-by: Lars Hamre <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* nir: rewrite nir_foreach_block and friendsConnor Abbott2016-04-272-83/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, these were functions which took a callback. This meant that the per-block code had to be in a separate function, and all the data that you wanted to pass in had to be a single void *. They walked the control flow tree recursively, doing a depth-first search, and called the callback in a preorder, matching the order of the original source code. But since each node in the control flow tree has a pointer to its parent, we can implement a "get-next" and "get-previous" method that does the same thing that the recursive function did with no state at all. This lets us rewrite nir_foreach_block() as a simple for loop, which lets us greatly simplify its users in some cases. This does require us to rewrite every user, although the transformation from the old nir_foreach_block() to the new nir_foreach_block() is mostly trivial. One subtlety, though, is that the new nir_foreach_block() won't handle the case where the current block is deleted, which the old one could. There's a new nir_foreach_block_safe() which implements the standard trick for solving this. Most users don't modify control flow, though, so they won't need it. Right now, only opt_select_peephole needs it. The old functions are reimplemented in terms of the new macros, although they'll go away after everything is converted. v2: keep an implementation of the old functions around v3 (Jason Ekstrand): A small cosmetic change and a bugfix in the loop handling of nir_cf_node_cf_tree_last(). v4 (Jason Ekstrand): Use the _safe macro in foreach_block_reverse_call Reviewed-by: Jason Ekstrand <[email protected]>
* nir/opt_cp: use nir_block_get_following_if()Connor Abbott2016-04-271-7/+3
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* vbo: Return INVALID_OPERATION during draw with a mapped bufferJordan Justen2016-04-272-47/+42
| | | | | | | | | | | | | | | | Fixes the OpenGLES 3.1 CTS: * ESEXT-CTS.draw_elements_base_vertex_tests.invalid_mapped_bos Because this is triggering the error message after the normal API validation phase, we don't have the API function name available, and therefore we generate an error message without the draw call name: Mesa: User error: GL_INVALID_OPERATION in draw call (vertex buffers are mapped) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95142 Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* anv/formats: Return proper error code for unsupported formatsNanley Chery2016-04-271-1/+1
| | | | | | | | | Fixes some failures in dEQP-VK.api.info.image_format_properties.* and enables the test group to execute without assert failing. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94896 Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/device: Set the compressed texture feature flags correctlyNanley Chery2016-04-271-2/+3
| | | | | | | | | | | | | | | Sampling from an ETC2 texture is supported on Bay Trail and from Gen8 onwards. While ASTC_LDR is supported on Gen9, the logic to handle such formats has not yet been implemented in the driver. Fixes dEQP-VK.api.info.format_properties.compressed_formats. v2: Enable ETC2 for Bay Trail (Kenneth Graunke) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94896 Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir/algebraic: Add a bit-size validatorJason Ekstrand2016-04-271-0/+270
| | | | | | | | | This commit adds a validator that ensures that all expressions passed through nir_algebraic are 100% non-ambiguous as far as bit-sizes are concerned. This way it's a compile-time error rather than a hard-to-trace C exception some time later. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* nir/opt_algebraic: Fix some expressions with ambiguous bit sizesJason Ekstrand2016-04-271-3/+3
| | | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir/search: Respect the bit_size parameter on nir_search_valueJason Ekstrand2016-04-272-1/+18
| | | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir/algebraic: Add a mechanism for specifying the bit size of a valueJason Ekstrand2016-04-273-4/+31
| | | | Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir/algebraic: Use "uint" instead of "unsigned" for uint typesJason Ekstrand2016-04-271-2/+2
| | | | | | | | | This is consistent with the rename done for the rest of NIR. Currently, "bool" is the only type specifier used in nir_opt_algebraic.py so this is really a no-op. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir/algebraic: Do better error reporting of bad expressionsJason Ekstrand2016-04-271-1/+16
| | | | | | | | | | | | Previously, if an exception was encountered anywhere, nir_algebraic would just die in a fire with no indication whatsoever as to where the actual bug is. This commit makes it print out the particular search-and-replace expression that is causing problems along with the exception. Also, it will now report all of the errors it finds and then exit at the end like a standard C compiler would do. Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* isl: move -lm at the end of tests_ldaddAlejandro Piñeiro2016-04-271-2/+2
| | | | | | | The test was failing to build with "undefined reference to `roundf'" errors, so Make check on mesa was failing. Reviewed-by: Jason Ekstrand <[email protected]>
* i965/blorp/gen8: Fix blitting of interleaved msaa surfacesTopi Pohjolainen2016-04-271-2/+16
| | | | | | | | | | | | | | | | | | Fixes ES31-CTS.gtf.GL31Tests.texture_stencil8.texture_stencil8_multisample. Current logic divides given layer of one by number of samples (four) trashing the layer to zero. Layer adjustment is only to be used with non-interleaved msaa surfaces where samples for particular layer are in multiple slices. I copy-pasted a bit of documentation from brw_blorp.c::brw_blorp_compute_tile_offsets(). Also took the opportunity to fix the comment regarding sampling as 2D, cube textures are the only exception. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
* llvmpipe: s/Elements/ARRAY_SIZE/Brian Paul2016-04-2712-54/+54
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* tgsi: s/Elements/ARRAY_SIZE/Brian Paul2016-04-276-28/+28
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* os: s/Elements/ARRAY_SIZE/Brian Paul2016-04-271-1/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* hud: s/Elements/ARRAY_SIZE/Brian Paul2016-04-273-7/+7
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: s/Elements/ARRAY_SIZE/Brian Paul2016-04-279-29/+29
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* draw: s/Elements/ARRAY_SIZE/Brian Paul2016-04-277-24/+24
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* softpipe: s/Elements/ARRAY_SIZE/Brian Paul2016-04-277-27/+27
| | | | | | | Try to standardize on the later, which is defined in the common util/ directory. Reviewed-by: Jose Fonseca <[email protected]>
* winsys/radeon: remove use_reusable_pool parameter from buffer_createNicolai Hähnle2016-04-2711-26/+17
| | | | | | All callers set this parameter to true. Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon: remove use_reusable_pool parameter from r600_init_resourceNicolai Hähnle2016-04-275-9/+7
| | | | | | All callers set it to true. Reviewed-by: Marek Olšák <[email protected]>
* radeon/video: always use the reusable buffer poolNicolai Hähnle2016-04-274-5/+5
| | | | | | | | | | | A semantic error was introduced in a past refactoring that caused the bind parameter to be passed into the use_reusable_pool parameter of buffer_create. Since this clearly makes no sense, and there is no clear reason why the cache _shouldn't_ be used, just use the cache always. Cc: Christian König <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: work around an MSAA fast stencil clear problemNicolai Hähnle2016-04-271-3/+15
| | | | | | | | A piglit test (arb_texture_multisample-stencil-clear) has been sent. This problem was discovered analyzing Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93767 Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: expclear must be disabled on first Z/S clearNicolai Hähnle2016-04-271-2/+2
| | | | | | The documentation and the HW team say so. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: move blend choice out of loop in si_blit_decompress_colorNicolai Hähnle2016-04-271-9/+9
| | | | | | It does not depend on the level or layer. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: use level mask for early out in si_blit_decompress_colorNicolai Hähnle2016-04-271-6/+8
| | | | | | | | Mostly for consistency with the other decompress functions, but note that in the non-DCC decompress case, the function can now early-out in slightly more (albeit probably rare) cases. Reviewed-by: Marek Olšák <[email protected]>