summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Add {OES,EXT}_tessellation_shader to the extensions table.Kenneth Graunke2016-08-082-2/+9
| | | | | | | | | | | | Also update _mesa_has_tessellation to know about the new extensions. For now, these are dummy_false, to avoid turning on the extension until everything's in place. Eventually, we'll move them over to the "ARB_tessellation_shader" bit so that any drivers supporting both the desktop extension and ES 3.1 get the feature. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mapi: Add PatchParameteriOES and PatchParameteriEXT.Kenneth Graunke2016-08-082-0/+13
| | | | | | | | | The OES_tessellation_shader and EXT_tessellation_shader specifications have suffixed names. These are identical to the core function, so just alias them. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* radeonsi: add has_draw_indirect_multi flagNicolai Hähnle2016-08-083-1/+14
| | | | | | | | | | Prefer to use DRAW_(INDEX)_INDIRECT_MULTI when available in the firmware. Versions for SI and CI already added as provided by the firmware team, but keep in mind that they won't currently be used since the radeon kernel module has no interface to query the firmware version. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: transpose indirect/index draw dispatchNicolai Hähnle2016-08-081-45/+31
| | | | | | This allows better code sharing for indirect draw calls. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: move index buffer calculations in si_emit_draw_packets upNicolai Hähnle2016-08-081-9/+12
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: unify emitting PKT3_SET_BASE for indirect drawsNicolai Hähnle2016-08-081-16/+9
| | | | Reviewed-by: Marek Olšák <[email protected]>
* winsys/amdgpu: query ME/PFP/CE firmware versionsNicolai Hähnle2016-08-083-0/+28
| | | | | | | The radeon kernel module doesn't have the firmware query interface, so the corresponding values will remain 0. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: move spi_ps_input_addr override outside of the loopNicolai Hähnle2016-08-081-3/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: drop unnecessary u_pstipple.h includeNicolai Hähnle2016-08-081-1/+0
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: do not pass the return type to buffer_load_constNicolai Hähnle2016-08-081-18/+18
| | | | | | | Overriding it is not allowed anyway, and actually lead to a crash when polygon stippling was used with monolithic shaders. Reviewed-by: Marek Olšák <[email protected]>
* glsl: Combine GS and TES array resizing visitors.Kenneth Graunke2016-08-071-72/+35
| | | | | | | | These are largely identical, except that the GS version has a few extra error conditions. We can just pass in the stage and skip these. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: Fix location bias for patch variables.Kenneth Graunke2016-08-071-0/+3
| | | | | | | | | | | | We need to subtract VARYING_SLOT_PATCH0, not VARYING_SLOT_VAR0. Since "patch" only applies to inputs and outputs, we can just handle this once outside the switch statement, rather than replicating the check twice and complicating the earlier conditions. Cc: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: Fix the program resource names of gl_TessLevelOuter/Inner[].Kenneth Graunke2016-08-071-0/+12
| | | | | | | | | These are lowered to gl_TessLevel{Outer,Inner}MESA. We need them to appear in the program resource list with their original names and types. Cc: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: Delete bogus ir_set_program_inouts assert.Kenneth Graunke2016-08-071-3/+7
| | | | | | | | | | | | | | | | This assertion is bogus. Varying structs, and arrays of structs, are allowed by GLSL, and we can see them here. While we currently don't have any partial-variable support for those, simply returning false and marking the entire thing as used is certainly legitimate. I believe this is often swept under the rug by varying packing, but that's disabled in certain tessellation situations. Hit by 20 dEQP-GLES31.functional.tessellation.user_defined_io.* tests. Cc: [email protected] Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: Simplify interface qualifier parsing.Kenneth Graunke2016-08-071-34/+7
| | | | | | | | This better matches the grammar in section 4.3.9 of the GLSL 4.5 spec, and also removes some redundant code. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* glsl: Add a has_tessellation_shader() helper.Kenneth Graunke2016-08-073-18/+12
| | | | | | | | Similar to has_geometry_shader(), has_compute_shader(), and so on. This will make it easier to add more conditions here later. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* Revert "gallium/radeon: count contexts"Marek Olšák2016-08-062-4/+0
| | | | | | This reverts commit b403eb338533894ee012a96bf55653996c92ec7c. Not needed.
* radeonsi: add GLSL lit testsMarek Olšák2016-08-0619-0/+490
| | | | | | | | | | | | They can only be run manually as described in HOW_TO_RUN. It should help catch suboptimal code generation. Some of the tests already fail. v2: rename the tests to *.glsl, fix lit.cfg to find FileCheck Reviewed-by: Nicolai Hähnle <[email protected]> (v1)
* radeonsi: add a standalone compiler amdgcn_glslcMarek Olšák2016-08-063-0/+323
| | | | | | | | | This will be used by GLSL lit tests. For developers only. It shouldn't be distributable and it doesn't use the Mesa build system. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: add environment variable SI_FORCE_FAMILYMarek Olšák2016-08-061-0/+32
| | | | | | | | This will be used by: amdgcn_glslc -mcpu=[family] It can also be used for shader-db if you want stats for a different family. Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/radeon: implement cs_get_next_fenceMarek Olšák2016-08-062-2/+29
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/amdgpu: implement cs_get_next_fenceMarek Olšák2016-08-062-4/+35
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: add cs_get_next_fence winsys callbackMarek Olšák2016-08-061-0/+7
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: count contextsMarek Olšák2016-08-062-0/+4
| | | | | | We don't wanna use unflushed fences when we have multiple contexts. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: count gfx IB flushesMarek Olšák2016-08-063-1/+3
| | | | | | | This will be used as a counter for whether fence_finish needs to flush the IB. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: move radeon_winsys::cs_memory_below_limit to driversMarek Olšák2016-08-067-52/+32
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: inline radeon_winsys::query_memory_usageMarek Olšák2016-08-064-15/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon/winsyses: expose per-IB used_vram and used_gart to driversMarek Olšák2016-08-065-25/+24
| | | | | | The following patches will use this. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon/winsyses: print CS submission error numberMarek Olšák2016-08-062-2/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: flush if constant, shader, and streamout buffers use too much memoryMarek Olšák2016-08-061-15/+18
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: flush if sampler views and images use too much memoryMarek Olšák2016-08-062-19/+63
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: deal with high vertex buffer memory usage correctlyMarek Olšák2016-08-063-3/+10
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: take compute shader and dispatch indirect memory usage into accountMarek Olšák2016-08-061-0/+6
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: take scratch buffer and draw indirect memory usage into accountMarek Olšák2016-08-061-0/+6
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: check IB memory usage of CP DMA operationsMarek Olšák2016-08-061-0/+5
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: add r600_resource::vram_usage and gart_usageMarek Olšák2016-08-063-12/+19
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: Copy bitmask of VBOs in the VAO on gl{Push,Pop}Attrib.Mathias Fröhlich2016-08-061-0/+2
| | | | | | | | | | | On gl{Push,Pop}Attrib(GL_CLIENT_VERTEX_ARRAY_BIT) take care that gl_vertex_array_object::VertexAttribBufferMask matches the bound buffer object in the gl_vertex_array_object::VertexBinding array. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Fredrik Höglund <[email protected]>
* anv/gen7_pipeline: Set PixelShaderKillPixel for discardsNanley Chery2016-08-051-0/+1
| | | | | | | | | | According to the IVB PRM Vol2 P1, this bit must be set if a pixel shader contains a discard instruction. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97207 Cc: "12.0" <[email protected]> Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* util/r11g11b10f: Whitespace cleanupsJason Ekstrand2016-08-051-14/+7
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util/format: Use explicitly sized typesJason Ekstrand2016-08-052-6/+8
| | | | | | | | | Both the rgb9e5 and r11g11b10 formats are defined based on how they are packed into a 32-bit integer. It makes sense that the functions that manipulate them take an explicitly sized type. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util/rgb9e5: Get rid of the float754 unionJason Ekstrand2016-08-051-42/+27
| | | | | | | | | | | There are a number of reasons for this refactor. First, format_rgb9e5.h is not something that a user would expect to define such a generic union. Second, defining it requires checking for endianness which is ugly. Third, 90% of what we were doing with the union was float <-> uint32_t bitcasts and the remaining 10% can be done with a sinmple left-shift by 23. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util/format_rgb9e5: Get rid of the rgb9e5 unionJason Ekstrand2016-08-051-32/+6
| | | | | | | | | The rgb9e5 format is a packed format defined in terms of slicing up a single 32-bit value. The bitfields are far more confusing than simple shifts and require that we check the endianness. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util: Move format_r11g11b10f.h to src/utilJason Ekstrand2016-08-0510-8/+8
| | | | | | | It's used from both mesa main and gallium. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util: Move format_rgb9e5.h to src/utilJason Ekstrand2016-08-0510-8/+8
| | | | | | | It's used from both mesa main and gallium. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* glsl: fix indentation, comments and line lengths in ast_function.cppAndres Gomez2016-08-051-406/+443
| | | | | Acked-by: Timothy Arceri <[email protected]> Signed-off-by: Andres Gomez <[email protected]>
* glsl: apply_implicit_conversion is static againAndres Gomez2016-08-052-5/+1
| | | | | Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Andres Gomez <[email protected]>
* glsl: struct constructors/initializers only allow implicit conversionsAndres Gomez2016-08-051-49/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an argument for a structure constructor or initializer doesn't match the expected type, only Section 4.1.10 “Implicit Conversions” are allowed to try to match that expected type. From page 32 (page 38 of the PDF) of the GLSL 1.20 spec: " The arguments to the constructor will be used to set the structure's fields, in order, using one argument per field. Each argument must be the same type as the field it sets, or be a type that can be converted to the field's type according to Section 4.1.10 “Implicit Conversions.”" From page 35 (page 41 of the PDF) of the GLSL 4.20 spec: " In all cases, the innermost initializer (i.e., not a list of initializers enclosed in curly braces) applied to an object must have the same type as the object being initialized or be a type that can be converted to the object's type according to section 4.1.10 "Implicit Conversions". In the latter case, an implicit conversion will be done on the initializer before the assignment is done." v2: Remove also the now redundant constant conversion, the constant_record_constructor helper and the replacement code (Timothy). Fixes GL44-CTS.shading_language_420pack.initializer_list_negative Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Andres Gomez <[email protected]>
* glsl: Refactor implicit conversion into its own helperAndres Gomez2016-08-051-80/+86
| | | | | | | | v2: Refactor also the conversion to constant and replacement code (Timothy). Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Andres Gomez <[email protected]>
* glsl/types: disallow implicit conversions before GLSL 1.20Andres Gomez2016-08-051-4/+4
| | | | | | | | | Implicit conversions were added in the GLSL 1.20 spec version. v2: Join the checks for GLSL 1.10 and ESSL (Timothy). Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Andres Gomez <[email protected]>
* i965: Rework the unlit centroid workaround.Kenneth Graunke2016-08-052-25/+33
| | | | | | | | | | | | | | | | | | | | | | | Previously, for every input, we moved the dispatch mask to the flag register, then emitted two predicated PLN instructions, one with centroid barycentric coordinates (for normal pixels), and one with pixel barycentric coordinates (for unlit helper pixels). Instead, we can simply emit a set of predicated MOVs at the top of the program which copy the pixel barycentric coordinates over the centroid ones for unlit helper pixel channels. Then, we can just use normal PLNs. On Sandybridge: total instructions in shared programs: 7538470 -> 7534500 (-0.05%) instructions in affected programs: 101268 -> 97298 (-3.92%) helped: 705 HURT: 9 (all of which are SIMD16 programs) Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]>