aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* r600g: kill off r600_shader_tgsi_instruction::{tgsi_opcode,is_op3}Emil Velikov2015-03-171-591/+589
| | | | | | | | Both of which are no longer used. Use designated initializer to make things obvious as people add/remove TGSI_OPCODEs. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: use the tgsi opcode from parse.FullToken.FullInstructionEmil Velikov2015-03-171-5/+8
| | | | | | | | | ... rather than the local one in inst_info->tgsi_opcode. This will allow us to simplify struct r600_shader_tgsi_instruction. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* i965/fs: Apply gl_FrontFacing ? -1 : 1 optimization only for floatsIan Romanick2015-03-171-0/+3
| | | | | | | | | | | | | | | | At the very least, unreal4/sun-temple/102.shader_test uses this pattern for a signed integer result. However, that shader did not hit the optimization in the first place because it uses !gl_FrontFacing. I changed the shader to use remove the logical-not and reverse the other operands. I verified that incorrect code is generated before this change and correct code is generated after. Fixes fs-frontfacing-ternary-1-neg-1.shader_test. No shader-db changes. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Change try_opt_frontfacing_ternary to eliminate assertsIan Romanick2015-03-171-5/+2
| | | | | | | | If we check for the case that is actually necessary, the asserts become superfluous. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965/fs: Handle CMP.nz ... 0 and AND.nz ... 1 similarly in cmod propagationIan Romanick2015-03-172-1/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Espically on platforms that do not natively generate 0u and ~0u for Boolean results, we generate a lot of sequences where a CMP is followed by an AND with 1. emit_bool_to_cond_code does this, for example. On ILK, this results in a sequence like: add(8) g3<1>F g8<8,8,1>F -g4<0,1,0>F cmp.l.f0(8) g3<1>D g3<8,8,1>F 0F and.nz.f0(8) null g3<8,8,1>D 1D (+f0) iff(8) Jump: 6 The AND.nz is obviously redundant. By propagating the cmod, we can instead generate add.l.f0(8) null g8<8,8,1>F -g4<0,1,0>F (+f0) iff(8) Jump: 6 Existing code already handles the propagation from the CMP to the ADD. Shader-db results: GM45 (0x2A42): total instructions in shared programs: 3550829 -> 3550788 (-0.00%) instructions in affected programs: 10028 -> 9987 (-0.41%) helped: 24 Iron Lake (0x0046): total instructions in shared programs: 4993146 -> 4993105 (-0.00%) instructions in affected programs: 9675 -> 9634 (-0.42%) helped: 24 Ivy Bridge (0x0166): total instructions in shared programs: 6291870 -> 6291794 (-0.00%) instructions in affected programs: 17914 -> 17838 (-0.42%) helped: 48 Haswell (0x0426): total instructions in shared programs: 5779256 -> 5779180 (-0.00%) instructions in affected programs: 16694 -> 16618 (-0.46%) helped: 48 Broadwell (0x162E): total instructions in shared programs: 6823088 -> 6823014 (-0.00%) instructions in affected programs: 15824 -> 15750 (-0.47%) helped: 46 No chage on Sandy Bridge or on any platform when NIR is used. v2: Add unit tests suggested by Matt. Remove spurious writes_flag() check on scan_inst when scan_inst is known to be BRW_OPCODE_CMP (also suggested by Matt). v3: Fix some comments and remove some explicit int() casts in fs_reg constructors in the unit tests. Both suggested by Matt. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Mark paths in linear <-> tiled functions as unreachable().Matt Turner2015-03-171-0/+16
| | | | | | | | | text data bss dec hex filename 9663 0 0 9663 25bf intel_tiled_memcpy.o before 8215 0 0 8215 2017 intel_tiled_memcpy.o after Reviewed-by: Carl Worth <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* egl: Remove eglQueryString virtual dispatch.Matt Turner2015-03-176-109/+12
| | | | Reviewed-by: Chad Versace <[email protected]>
* main: Correct _mesa_error with no format in bufferobj.c.Laura Ekstrand2015-03-171-1/+1
| | | | | | | This fixes Bug 89616, a build failure due to line 1639 of bufferobj.c: _mesa_error(ctx, GL_INVALID_OPERATION, func); Trivial.
* main: Cosmetic changes to GetBufferSubData.Laura Ekstrand2015-03-172-3/+3
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry point for GetNamedBufferSubData.Laura Ekstrand2015-03-174-0/+34
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* main: Cosmetic updates to GetBufferPointerv.Laura Ekstrand2015-03-171-4/+5
| | | | | | | v3: Review from Fredrik Hoglund -Split cosmetic refactor of GetBufferPointerv out into a separate commit Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry point for GetNamedBufferPointerv.Laura Ekstrand2015-03-174-0/+31
| | | | | | | v3: Review from Fredrik Hoglund -Split cosmetic refactor of GetBufferPointerv out into a separate commit Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry points for GetNamedBufferParameteri[64]v.Laura Ekstrand2015-03-174-0/+60
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* main: Refactor GetBufferParameteri[64]v.Laura Ekstrand2015-03-171-74/+45
| | | | | | v2: Split into a refactor commit and an entry point commit. Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry point for FlushMappedNamedBufferRange.Laura Ekstrand2015-03-174-0/+27
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* main: Refactor FlushMappedBufferRange.Laura Ekstrand2015-03-172-26/+40
| | | | | | | v2:-Remove "_mesa" from in front of static software fallback. -Split out the refactor from the addition of the DSA entry points. Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry point for UnmapNamedBuffer.Laura Ekstrand2015-03-174-13/+47
| | | | | | | | v2: review from Ian Romanick - Restore VBO_DEBUG and BOUNDS_CHECK - Remove _mesa from static software fallback unmap_buffer. Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry points for MapNamedBuffer[Range].Laura Ekstrand2015-03-174-3/+69
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* main: Refactor MapBuffer[Range].Laura Ekstrand2015-03-172-161/+133
| | | | | | | | | | v2: review from Jason Ekstrand - Split refactor from addition of DSA entry points. review from Ian Romanick - Remove "_mesa" from static software fallback map_buffer_range - Restore VBO_DEBUG and BOUNDS_CHECK Reviewed-by: Fredrik Höglund <[email protected]>
* main: Minor whitespace fixes in ClearNamedBuffer[Sub]Data.Laura Ekstrand2015-03-172-4/+4
| | | | Reviewed-by: Fredrik Höglund <[email protected]>
* main: Add entry points for ClearNamedBuffer[Sub]Data.Laura Ekstrand2015-03-174-0/+66
| | | | Reviewed-by: Martin Peres <[email protected]>
* main: Refactor ClearBuffer[Sub]Data.Laura Ekstrand2015-03-173-79/+69
| | | | | | | | v2: review by Jason Ekstrand - Split refactor of clear buffer sub data from addition of DSA entry points. Reviewed-by: Martin Peres <[email protected]>
* main: Add entry point for CopyNamedBufferSubData.Laura Ekstrand2015-03-174-33/+87
| | | | | | v2: remove _mesa in front of static software fallback. Reviewed-by: Martin Peres <[email protected]>
* main: Improve errors and style in BufferSubData.Laura Ekstrand2015-03-172-5/+9
| | | | | | | - More explicit error reporting. - Removed legacy style. Reviewed-by: Martin Peres <[email protected]>
* main: Add entry point for NamedBufferSubData.Laura Ekstrand2015-03-174-49/+97
| | | | | | | | | v2: review by Ian Romanick - Remove "_mesa" from name of static software fallback buffer_sub_data. - Remove mappedRange from _mesa_buffer_sub_data. - Removed some cosmetic changes to a separate commit. Reviewed-by: Martin Peres <[email protected]>
* main: Add entry point for NamedBufferData.Laura Ekstrand2015-03-174-22/+68
| | | | | | | | | | v2: review from Ian Romanick - Fix space in ARB_direct_state_access.xml. - Remove "_mesa" from the name of buffer_data static fallback. - Restore VBO_DEBUG and BOUNDS_CHECK. - Fix beginning of comment to start on same line as /* Reviewed-by: Martin Peres <[email protected]>
* main: Add entry point for NamedBufferStorage.Laura Ekstrand2015-03-174-17/+65
| | | | Reviewed-by: Martin Peres <[email protected]>
* main: Add entry point for CreateBuffers.Laura Ekstrand2015-03-174-14/+64
| | | | Reviewed-by: Martin Peres <[email protected]>
* Revert "main: _mesa_cube_level_complete checks NumLayers."Laura Ekstrand2015-03-171-4/+0
| | | | | | | | | | | | | | | | | This reverts commit 1ee000a0b6737d6c140d4f07b6044908b8ebfdc7. Failures with the GLES3 conformance suite and Synmark2 OGLHdrBloom revealed that this commit was in error. Extensive testing with Piglit prior to patch review and upstreaming did not reveal this problem because, in the few Piglit tests that test for cube completeness, NumLayers = 6. This is because all of the existing tests use TextureStorage to initialize the texture, which sets NumLayers. A new Piglit test has been sent to the mailing list that reproduces the bug related to this patch ("texturing: Testing glGenerateMipmap(GL_TEXTURE_CUBE_MAP) without glTexStorage2D"). Reviewed-by: Jason Ekstrand <[email protected]>
* i965/skl: Send a message header when doing constant loads SIMD4x2Neil Roberts2015-03-173-6/+53
| | | | | | | | | | | | | | Commit 0ac4c272755c7 made it add a header for the send message when using SIMD4x2 on Skylake because without this it will end up using SIMD8D. However the patch missed the case when a sampler is being used to implement constant loads from a buffer surface in a SIMD4x2 vertex shader. This fixes 29 Piglit tests, mostly related to the ARL instruction in vertex programs. Reviewed-by: Kristian Høgsberg <[email protected]> Tested-by: Anuj Phogat <[email protected]>
* i965/fs: in MAD optimizations, switch last argument to be immediateTapani Pälli2015-03-171-1/+10
| | | | | | | | | | | | | | | | | Commit bb33a31 introduced optimizations that transform cases of MAD in to simpler forms but it did not take in to account that src[0] can not be immediate and did not report progress. Patch switches src[0] and src[1] if src[0] is immediate and adds progress reporting. If both sources are immediates, this is taken care of by the same opt_algebraic pass on later run. v2: Fix for all cases, use temporary fs_reg (Matt, Kenneth) Signed-off-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89569 Reviewed-by: Francisco Jerez <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]> Cc: "10.5" <[email protected]>
* gallivm: abort properly when running out of buffer space in lp_disassemblyRoland Scheidegger2015-03-171-4/+8
| | | | | | | Before this actually ran into an infinite loop printing out "invalid"... Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* st/dri: remove unused include from the automake/scons buildEmil Velikov2015-03-162-2/+0
| | | | | | | st/dri/common hasn't been around for a while. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* auxiliary/os: fix the android build - s/drm_munmap/os_munmap/Emil Velikov2015-03-161-2/+2
| | | | | | | | | Squash this silly typo introduced with commit c63eb5dd5ec(auxiliary/os: get the mmap/munmap wrappers working with android) Cc: "10.4 10.5" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/sw/kms: trivial cleanupsEmil Velikov2015-03-161-4/+2
| | | | | | | | Remove the forward declaration and make use of the DEBUG_PRINT macro for debug builds. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* loader: include <sys/stat.h> for non-sysfs buildsEmil Velikov2015-03-161-1/+1
| | | | | | | | | | | Required by fstat(), otherwise we'll error out due to implicit function declaration. Cc: "10.4 10.5" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89530 Signed-off-by: Emil Velikov <[email protected]> Reported-by: Vadim Rutkovsky <[email protected]> Tested-by: Vadim Rutkovsky <[email protected]>
* radeonsi: implement TGSI_OPCODE_BFI (v2)Marek Olšák2015-03-161-0/+34
| | | | | | | v2: Don't use the intrinsics, the shader backend can recognize these patterns and generates optimal code automatically. Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: add a helper for extracting bitfields from parameters (v2)Marek Olšák2015-03-161-16/+27
| | | | | | | | This will be used a lot (especially by tessellation). v2: don't use the bfe intrinsic Reviewed-by: Tom Stellard <[email protected]>
* i965: Emit IF/ELSE/ENDIF/WHILE JIP with type W on Gen7Antia Puentes2015-03-161-4/+4
| | | | | | | | | | IvyBridge and Haswell PRM say that the JIP should be emitted with type W but we were using UD. The previous implementation did not show adverse effects, but IMHO it is safer to follow the specification thoroughly. Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Antia Puentes <[email protected]>
* radeonsi: move scratch reloc state setupMarek Olšák2015-03-162-15/+22
| | | | | | | | - move it to its own function - do it after all states are emitted - bump SI_MAX_DRAW_CS_DWORDS Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: don't emit PA_SC_LINE_STIPPLE if not rendering linesMarek Olšák2015-03-161-0/+8
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: don't emit PA_SC_LINE_STIPPLE after every rasterizer state changeMarek Olšák2015-03-164-7/+7
| | | | | | Do it only when the line stipple state is changed. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: move PA_SU_SC_MODE_CNTL to rasterizer stateMarek Olšák2015-03-165-30/+14
| | | | | | | | | This requires enabling the optional GL provoking vertex behavior for quads. + some cosmetic changes, so that the register is set exactly the same as on r600. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: implement line and polygon smoothingMarek Olšák2015-03-164-10/+49
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: add shader code for smoothingMarek Olšák2015-03-163-1/+39
| | | | | | | The fragment shader multiplies the alpha channel with gl_SampleMaskIn. If blending is enabled, it looks like MSAA. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: split sample locations into its own state atomMarek Olšák2015-03-165-0/+18
| | | | | | Sample locations are not updated as often as framebuffers. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: add basic code for overrasterizationMarek Olšák2015-03-165-16/+28
| | | | | | | This will be used for line and polygon smoothing. This is GCN-only even though it's in shared code. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: small cleanup in si_shader_selector_keyMarek Olšák2015-03-161-12/+12
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: simplify accessing alpha pointer in si_llvm_emit_fs_epilogueMarek Olšák2015-03-161-7/+8
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: add support for easy opcodes from ARB_gpu_shader5Marek Olšák2015-03-161-0/+8
| | | | | | | | I have to use the BFE instrinsics, because BFE is one of the most complex instructions that can't be matched easily. BFE has 3 conditional branches and one of them is quite big. In the isel DAG, lowered BFE has 27 nodes (including leafs).