summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* gallium: Added SWR support for gdiGeorge Kyriazis2016-11-211-5/+23
| | | | | | | | | | Added hooks for screen creation and swap. Still keep llvmpipe the default software renderer. v2: split from bigger patch v3: reword commit message Reviewed-by: Emil Velikov <[email protected]>
* mesa: removed redundant #elseGeorge Kyriazis2016-11-211-1/+0
| | | | Reviewed-by: Emil Velikov <[email protected]>
* i965/hsw: Set integer mode in sampling state for stencil texturingJordan Justen2016-11-212-18/+9
| | | | | | | | | | | | | | | Fixes: ES31-CTS.functional.texture.border_clamp.formats.depth24_stencil8_sample_stencil.nearest_size_pot ES31-CTS.functional.texture.border_clamp.formats.depth24_stencil8_sample_stencil.nearest_size_npot ES31-CTS.functional.texture.border_clamp.formats.depth32f_stencil8_sample_stencil.nearest_size_pot ES31-CTS.functional.texture.border_clamp.formats.depth32f_stencil8_sample_stencil.nearest_size_npot ES31-CTS.functional.texture.border_clamp.unused_channels.depth24_stencil8_sample_stencil ES31-CTS.functional.texture.border_clamp.unused_channels.depth32f_stencil8_sample_stencil Cc: "13.0" <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: fold always true conditionalEmil Velikov2016-11-211-4/+2
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: drop unneeded assertEmil Velikov2016-11-211-1/+0
| | | | | | | | As seen a couple of lines above - there's no way for the assert to trigger. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/wayland: remove non-applicable destroyDrawable from error pathEmil Velikov2016-11-211-3/+1
| | | | | | | | If we fail to create the drawable there's not much point in attampting to destroy it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* loader: automake: whitespace cleanupEmil Velikov2016-11-211-1/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
* gbm: automake: remove unused definesEmil Velikov2016-11-211-2/+0
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eduardo Lima Mitev <[email protected]>
* intel: aubinator: Fix resource leak in gen_spec_load_from_pathGwan-gyeong Mun2016-11-211-0/+1
| | | | | | | | | | This fixes resource leak in gen_spec_load_from_path XML_ParserCreate failure path CID 1373564 Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* egl/android: Use gralloc::lock_ycbcr for resolving YUV formats (v2)Tomasz Figa2016-11-211-27/+137
| | | | | | | | | | | | | | | | | There is an interface that can be used to query YUV buffers for their internal format. Specifically, if gralloc:lock_ycbcr() is given no SW usage flags, it's supposed to return plane offsets instead of pointers. Let's use this interface to implement support for YUV formats in Android EGL backend. v2: Fixes from Emil's review: a) Added comments for parts that might be not clear, b) Changed get_fourcc_yuv() to return -1 on failure, c) Changed is_yuv() to use bool. Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl/android: Get gralloc module in dri2_initialize_android() (v2)Tomasz Figa2016-11-212-12/+19
| | | | | | | | | | | | | | | Currently droid_open_device() gets a reference to the gralloc module only for its own use and does not store it anywhere. To make it possible to call gralloc methods from code added in further patches, let's refactor current code to get gralloc module in dri2_initialize_android() and store it in dri2_dpy. v2: fixes from Emil's review: a) remove duplicate initialization of 'err'. Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* egl/android: Remove handling of RGB_888 pixel formatTomasz Figa2016-11-211-6/+0
| | | | | | | | | | It is currently completely broken, as it ends up using RGBX_8888 on hardware side, due to no way of distinguishing between these two in the DRI API, while HAL_PIXEL_FORMAT_RGB_888 is clearly defined to be the 3-byte per pixel RGB format. Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* radeonsi: Fix resource leak in gs_copy_shader allocation failure pathGwan-gyeong Mun2016-11-221-1/+7
| | | | | | | | | CID 1394028 Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* glsl/lower_output_reads: remove unused mem_ctxNicolai Hähnle2016-11-211-4/+0
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl/lower_output_reads: bail early in tessellation control shadersNicolai Hähnle2016-11-211-2/+6
| | | | | | | | This whole pass is a no-op. Acked-by: Edward O'Callaghan <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl/lower_output_reads: fix geometry shader output handling with ↵Nicolai Hähnle2016-11-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conditional emit Consider a geometry shader that contains code like this: some_out = expr; if (cond) { ... EmitVertex(); } else { ... EmitVertex(); } Both branches should see the correct value of some_out. Since this is a rather subtle and rare case, I'm submitting a piglit test for this as well. GLSL says that the values of output variables are undefined after EmitVertex(). With this change, the values will now be defined and unmodified. This may reduce optimization opportunities in the probably quite rare case where subsequent compiler passes cannot prove that the value of the output variable is overwritten. Cc: 13.0 <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: store group_size_variable in struct si_computeNicolai Hähnle2016-11-211-5/+8
| | | | | | | | | | | | | | For compute shaders, we free the selector after the shader has been compiled, so we need to save this bit somewhere else. Also, make sure that this type of bug cannot re-appear, by NULL-ing the selector pointer after we're done with it. This bug has been there since the feature was added, but was only exposed in piglit arb_compute_variable_group_size-local-size by commit 9bfee7047b70cb0aa026ca9536465762f96cb2b1 (which is totally unrelated). Cc: 13.0 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl: don't flatten if-blocks with dynamic array indicesNicolai Hähnle2016-11-211-2/+17
| | | | | | | | | This fixes the regression of radeonsi in glsl-1.10/execution/variable-indexing/vs-output-array-vec3-index-wr caused by commit 74e39de9324d2d2333cda6adca50ae2a3fc36de2. Acked-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* anv/state: enable coordinate address rounding for Min/Mag filtersIago Toral Quiroga2016-11-211-6/+11
| | | | | | | | | | | | | | This patch improves pass rate of dEQP-VK.texture.explicit_lod.2d.sizes.* from 68.0% (98/144) to 83.3% (120/144) by enabling sampler address rounding mode when the selected filter is not nearest, which is the same thing we do for OpenGL. These tests check texture filtering for various texture sizes and mipmap levels. The failures (without this patch) affect cases where the target texture has odd dimensions (like 57x35) and either the Min or the Mag filter is not nearest. Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Implement a depth stall restriction on gen7Jason Ekstrand2016-11-203-0/+35
| | | | | | | Fixes around 60 Vulkan CTS tests on Haswell Reviewed-by: Jordan Justen <[email protected]> Cc: "13.0" <[email protected]>
* nvc0/ir: use levelZero flag when the lod is set to 0Ilia Mirkin2016-11-202-6/+43
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: spir-v allows texture size query with and without lod.Dave Airlie2016-11-211-1/+4
| | | | | | | | | | The translation to llvm was failing here due to required lod. This fixes some new SteamVR shaders. Cc: "13.0" <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix image view creation for depth and stencil onlyDave Airlie2016-11-212-13/+9
| | | | | | | | | | | | | | | This fixes the image view for sampling just the depth. It removes some pointless swizzle code, and adds a missing case for the x8_d24 format. Fixes: dEQP-VK.renderpass.formats.d32_sfloat_s8_uint.input.* dEQP-VK.renderpass.formats.d24_unorm_s8_uint.input.* dEQP-VK.renderpass.formats.x8_d24_unorm_pack32.input.* Cc: "13.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: make sure to flush input attachments correctly.Dave Airlie2016-11-211-0/+1
| | | | | | | | | | This fixes 9 of the dEQP-VK.renderpass.attachment_allocation.input_output.* tests. Cc: "13.0" <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tnl: remove unneeded #include "util/simple_list.h"Brian Paul2016-11-202-2/+0
| | | | Reviewed-by: Vinson Lee <[email protected]>
* radeon: remove unneeded #include "util/simple_list.h"Brian Paul2016-11-205-5/+0
| | | | | | Compile tested only. Reviewed-by: Vinson Lee <[email protected]>
* r200: remove unneeded #include "util/simple_list.h"Brian Paul2016-11-205-5/+1
| | | | | | | And include "util/simple_list.h" where it is needed in r200_state.c Compile tested only. Reviewed-by: Vinson Lee <[email protected]>
* i915: remove unneeded #include "util/simple_list.h"Brian Paul2016-11-202-2/+0
| | | | | | Compile tested only. Reviewed-by: Vinson Lee <[email protected]>
* mesa: remove unneeded #includes in errors.cBrian Paul2016-11-201-6/+0
| | | | Reviewed-by: Vinson Lee <[email protected]>
* mesa: remove trailing whitespace in errors.cBrian Paul2016-11-201-6/+6
| | | | Reviewed-by: Vinson Lee <[email protected]>
* nir: Add a C wrapper for glsl_type::is_array_of_arrays().Kenneth Graunke2016-11-192-0/+7
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Store a clip_distance_mask field similar to cull_distance_mask.Kenneth Graunke2016-11-194-0/+7
| | | | | | | This isn't useful for legacy GL, but will be used in Vulkan. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Use shader_info for brw_vue_prog_data::cull_distance_mask.Kenneth Graunke2016-11-196-12/+12
| | | | | | | | This also allows us to move it from a GL specific location to a part of the compiler shared by both GL and Vulkan. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* compiler: Store the clip/cull distance array sizes in shader_info.Kenneth Graunke2016-11-193-5/+9
| | | | | | | We switched from a boolean to array lengths in gl_program a while back. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Fix GS push inputs with enhanced layouts.Kenneth Graunke2016-11-191-1/+1
| | | | | | | | | | | | We weren't taking first_component into account when handling GS push inputs. We hardly ever push GS inputs, so this was not caught by existing tests. When I started using component qualifiers for the gl_ClipDistance arrays, glsl-1.50-transform-feedback-type-and-size started catching this. Cc: "13.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Delete unused variable.Kenneth Graunke2016-11-191-2/+0
| | | | | | I forgot to delete this in 9ef2b9277d3bead6dbfa47e95794ca61e8be4e84. Signed-off-by: Kenneth Graunke <[email protected]>
* intel: Share URB configuration code between GL and Vulkan.Kenneth Graunke2016-11-198-294/+256
| | | | | | | | | This code is far too complicated to cut and paste. v2: Update the newly added genX_gpu_memcpy.c; const a few things. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Use arrays in Gen7+ URB code.Kenneth Graunke2016-11-191-202/+134
| | | | | | | | | | | So much of this code was cut and pasted per stage. We can accomplish much of it by looping over shader stages. Improves performance of OglBatch7 (version 6) by 1.50783% +/- 0.287049% (n = 71) at 1024x768 on Cherryview. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Drop brw->urb.{nr_*_entries,*_start} assignments from gen7_urb.c.Kenneth Graunke2016-11-191-17/+8
| | | | | | | | The context fields are for Gen4-5; setting them has always been useless. There's no point in spending the cost in the hottest path in the driver. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Switch to roundf in HS/DS URB code.Kenneth Graunke2016-11-191-2/+2
| | | | | | | | | | | Matt intentionally switched the VS calculation to be float-based in commit c1da15709a0c0c2775bd9e534f67c60f7dc95ce8. Tessellation support was written before this and rebased forward, and missed the change. Now it's consistent. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Make URB code use prog_data for GS/tessellation enable checks.Kenneth Graunke2016-11-191-6/+4
| | | | | | | | If geometry/tessellation shaders are disabled, prog_data will be NULL (see brw_state_upload.c). This consolidates dirty bits a little. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel: Convert devinfo->urb.min_*_entries into an array.Kenneth Graunke2016-11-195-38/+73
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel: Convert devinfo->urb.max_*_entries into an array.Kenneth Graunke2016-11-195-78/+120
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* swr: mark streamout buffers as writtenIlia Mirkin2016-11-191-0/+7
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Bruce Cherniak <[email protected]>
* st/mesa/glsl/nir/i965: make use of new gl_shader_program_data in ↵Timothy Arceri2016-11-1932-315/+323
| | | | | | gl_shader_program Reviewed-by: Emil Velikov <[email protected]>
* mesa: create new gl_shader_program_data structTimothy Arceri2016-11-193-0/+69
| | | | | | | | This will be used to share data between gl_program and gl_shader_program allowing for greater code simplification as we can remove a number of awkward uses of gl_shader_program. Reviewed-by: Emil Velikov <[email protected]>
* glsl: add new program driver function to standalone compilerTimothy Arceri2016-11-191-18/+43
| | | | | | | | | | | This fixes a regression with the standalone compiler caused by 9d96d3803ab5dc Note that we change standalone_compiler_cleanup() to no longer explicitly free the linked shaders as the will be freed when we free the parent ctx whole_program. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98774
* i965: Disable depth writes when depth test is GL_EQUAL.Kenneth Graunke2016-11-188-8/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no point in performing depth writes when the depth test comparison function is set to GL_EQUAL - it would just write out the same value that's already there (if it is written at all). While this is harmless from a functional perspective, it hurts performance. Obviously, writing to memory is not free, but there's another more subtle impact as well: it can prevent early depth optimizations. Depth writes aren't supposed to happen for pixels that are killed by fragment shader discard statements or the alpha test. So, with depth writes enabled and either of those, the pixel shader must be invoked to determine whether or not to perform the write. This is fairly stupid in the EQUAL case - we're running a shader to decide whether to replace the existing depth value with itself. By disabling these pointless writes, we allow early depth even with discards and alpha testing, allowing the hardware to skip the pixel shader altogether if the depth test fails. Improves performance of Unigine Valley: - Skylake GT2: +17.8% - Broadwell GT3e: +11.5% - Cherrytrail: +19.4% Huge thanks to Mark Janes for building frameretrace [1], the performance analysis tool that helped us find this issue, and to Robert Bragg for providing us performance metrics on Linux. Mark also spent the time to analyze Valley performance on Windows vs. Linux and discovered a discrepancy in early depth test metrics. Once he had isolated a draw call and drawn attention to the problem, fixing it was pretty simple. [1] https://github.com/janesma/apitrace/wiki/frameretrace-branch Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* glsl: tidy up entries temporaryTimothy Arceri2016-11-191-6/+8
| | | | | | | Here we just move initialisation of entries to where it is needed i.e. outside the loop and after the continue checks. Reviewed-by: Emil Velikov <[email protected]>
* glsl/i965: move per stage AtomicBuffers list to gl_programTimothy Arceri2016-11-1910-48/+25
| | | | Reviewed-by: Emil Velikov <[email protected]>