summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* glsl: add core plumbing for GL_ANDROID_extension_pack_es31aIlia Mirkin2016-09-132-0/+3
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: introduce glPrimitiveBoundingBoxARB entrypointIlia Mirkin2016-09-131-0/+3
| | | | | | | | | This requires a bit of rejiggering, since normally ES entrypoints alias core ones, not vice-versa. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add a GLES3.2 enums section, and expose new MS line width paramsIlia Mirkin2016-09-134-10/+46
| | | | | | | | | | | | | | This also exposes them for ARB_ES3_2_compatibility. While both specs refer to the new MS line width parameters being separate from the existing AA line widths, reality begs to differ. It's the same on all hardware currently supported by mesa. Should hardware come along that wants these to be different, they're easy enough to separate out. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]>
* intel/blorp: Rework alloc_binding_tableJason Ekstrand2016-09-131-5/+6
| | | | | | | | | | | | | The original blorp_alloc_binding_table helper was supposed to return the binding table offset and map along with the surface state maps. This isn't quite what we want, however. What we really want is the binding table offsets, surface state offsets, and surface state maps. In the GL driver, the binding table map *is* an array of surface state offsets. However, in Vulkan, this isn't quite true as the entries in the binding table are surface state offsets combined with another binding table block offset. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: Use blorp_copy for all copy_image operations on gen6+Jason Ekstrand2016-09-121-22/+6
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965/blorp: Add a copy_miptrees helperJason Ekstrand2016-09-122-0/+79
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* intel/blorp: Work in terms of logical array layersJason Ekstrand2016-09-121-4/+27
| | | | | | | | | | | | | | | | | | When Ivy Bridge introduced array multisampling, someone made the decision to do lots of stuff throughout the driver in terms of physical array layers rather than logical array layers. In ISL, we use logical array layers most of the time and it really makes no sense to use physical array layers in the blorp API. Every time someone passes physical array layers into blorp for an array multisampled surface, they're always divisible by the number of samples and we divide right away. Eventually, I'd like to rework most of the GL driver internals to use logical array layers but that's going to be a big project and will probably happen as part of the ISL conversion. For now, we'll do the conversion in brw_blorp and let blorp just use the logical layers. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Add a swizzle parameter to blorp_clearJason Ekstrand2016-09-121-2/+4
| | | | | | | | While we're here, we also re-arrange the parameters to better match the parameter order of blorp_blit. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Take a destination swizzle in blorp_blitJason Ekstrand2016-09-121-0/+1
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/blorp: Take an isl_swizzle instead of a SWIZZLEJason Ekstrand2016-09-121-1/+27
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* intel/isl: Add an isl_swizzle structure and use it for isl_view swizzlesJason Ekstrand2016-09-121-23/+8
| | | | | | | | | This should be more compact than the enum isl_channel_select[4] that we were using before. It's also very convenient because we already had such a structure in the Vulkan driver we just needed to pull it over. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* st/mesa: fix is_scissor_enabled when X/Y are negativeIlia Mirkin2016-09-121-4/+6
| | | | | | | | | | | | | | Similar to commit 49c24d8a24 ("i965: fix noop_scissor range issue on width/height") - take the X/Y into account to determine whether the scissor covers the whole area or not. Fixes the recently-added gl-1.0-scissor-depth-clear-negative-xy piglit test. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: <[email protected]>
* Revert "i965: Drop the maximum 3D texture size to 512 on Sandy Bridge"Jason Ekstrand2016-09-121-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6ba88bce64b343761aabe3a6c7ee285c6020a959. The commit was erroneous because GL has a separate limit, GL_MAX_FRAMEBUFFER_LAYERS which guards the number of layers you are allowed to render into. The GL 4.5 spec says: "The framebuffer attachment point attachment is said to be framebuffer attachment complete if [...] all of the following conditions are true: [...] If image is a three-dimensional, one- or two-dimensional array, or cube map array texture and the attachment is layered, the depth or layer count of the texture is less than or equal to the value of the implementation-dependent limit MAX_FRAMEBUFFER_LAYERS." and goes on to say that "framebuffer complete" requires all attachments to be "framebuffer attachment complete". On Sandy Bridge, we set GL_MAX_FRAMEBUFFER_LAYERS to 512 so creating a 3D texture bigger than 512 is fine; you just can't render into all of the slices at once. Fixes ES3-CTS.gtf.GL3Tests.npot_textures.npot_tex_image on Sandy Bridge Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa: Enable OES/EXT_tessellation_shader for ES 3.1 + ARB_tess drivers.Kenneth Graunke2016-09-121-4/+4
| | | | | | | | | Drivers which support ARB_tessellation_shader and ES 3.1 now will expose OES_tessellation_shader and EXT_tessellation_shader as well. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* i965: check for GL_TEXTURE_EXTERNAL_OES at miptree_create_for_teximageAlejandro Piñeiro2016-09-121-0/+1
| | | | | | | | | | | | | | | Forgotten on commit "i965: Fix calculation of the image height at start level". Thanks to Ilia Mirkin for point it. Fixes the following regressions on Haswell and Broadwell: ES2-CTS.gtf.GL2ExtensionTests.egl_image_external.TestSimpleUnassociated (crash back to pass) ES2-CTS.gtf.GL2ExtensionTests.egl_image_external.TestSimple (crash back to fail) ES2-CTS.gtf.GL2ExtensionTests.egl_image_external.TestVertexShader (crash back to fail) https://bugs.freedesktop.org/show_bug.cgi?id=97761 Reviewed-by: Jason Ekstrand <[email protected]>
* i965/rbc: Clarify rational given for shader image resolvesTopi Pohjolainen2016-09-121-3/+4
| | | | | | | | | | | | | | | | | | | | | | Original commit added documentation explaining lossless compression case: commit 56f29911ec9da25c78fbd3d4945d499e65ca4b5a Author: Topi Pohjolainen <[email protected]> Date: Tue Feb 2 10:00:41 2016 +0200 i965: Add a flag telling color resolve pass to ignore CCS_E It, however, easily gives the impression that the sole purpose of the intel_miptree_resolve_color() is to address lossless compression. Original intention is to document the lack of INTEL_MIPTREE_IGNORE_CCS_E flag given for the resolve call. This patch fixes this along with a typo found spotted further down. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/blorp: Use hw generetad primitive copies for layered clearsTopi Pohjolainen2016-09-121-24/+12
| | | | | Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/blorp: Sanity check all layers before actual clearTopi Pohjolainen2016-09-121-2/+5
| | | | | Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* intel/blorp: Add plumbing for setting color clear layer countTopi Pohjolainen2016-09-121-3/+3
| | | | | Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/rbc: Allocate mcs directlyTopi Pohjolainen2016-09-124-63/+26
| | | | | | | | | | | | | | | | such as we do for compressed msaa. In case of non-compressed simgle sampled buffers the allocation of mcs is deferred until there is actually a clear operation that needs the mcs. In case of render buffer compression the mcs buffer always needed and there is no real reason to defer the allocation. By doing it directly allows to drop quite a bit unnecessary complexity. Patch leaves brw_predraw_set_aux_buffers() a no-op. Subsequent patches will re-use it and it seemed cleaner to leave it instead of removing and re-introducing. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Add sanity check for non-compressible texture viewsTopi Pohjolainen2016-09-121-0/+34
| | | | | | | v2: Fix missing inline declaration Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/rbc: Consult rb settings for texture surface setupTopi Pohjolainen2016-09-121-7/+60
| | | | | | | | | | | | | | | | | | | | | | | | Once mcs buffer gets allocated without delay for lossless compression (same as we do for msaa), one gets regression in: GL45-CTS.texture_barrier_ARB.same-texel-rw Setting the auxiliary surface for both sampling engine and data port seems to fix this. I haven't found any hardware documentation backing this though. v2 (Jason): Prepare also for the case where surface is sampled with non-compressible format forcing also rendering without compression. v3: Split asserts and decision making. v4: Detailed comment provided by Jason explaining the need for using auxiliary buffer for texturing when the same surface is also used as render target. Added check for existence of renderbuffer before considering if underlying miptree matches. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Track non-compressible sampling of renderbuffersTopi Pohjolainen2016-09-123-2/+52
| | | | | | | | | | | | | | | | | v3: - Actually set the flags when needed instead of falsely overwriting them (Jason). - Use more generic name for flag (dropped RENDERBUFFER) - Consult also shader images v4: - Consult only lossless compressd shader images v5: - Check the existence of renderbuffer before considering if it matches the given miptree Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Replace boolean rb surface state setup argument with flagsTopi Pohjolainen2016-09-123-12/+20
| | | | | | | | | | | And add plumbing to provide it all the way to surface state emitter. This is not used yet but will be in subsequent patches to carry additional constraints. v2 (Jason): Use uint32_t instead of int as the type Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965/rbc: Allow integer formats as advertised in isl_format.cTopi Pohjolainen2016-09-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Blorp consults brw_is_color_fast_clear_compatible() to see if any restrictions apply for fast clear in addition to the capablities advertised in isl_format.c::format_info[]. On Gen8+ integer formats are backlisted for plain old fast clear but there is no reason why lossless compression shouldn't be supported. In fact, lossless compression of integer formats is already supported for normal render paths. This patch prepares for dropping the delayed allocating of the mcs buffer for lossless compression. Until now the skip of fast clear also prevented the mcs being allocated and hence the lossless compression being effectively turned off for integer formats. Once the mcs buffer is allocated beforehand, the assertion addressed here would start triggering. v2: Drop the assert instead of relaxing it (Jason) Fix typo while at it. Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: remove unused variable at intel_miptree_create_for_teximageAlejandro Piñeiro2016-09-121-1/+0
| | | | | | | After commit "i965: Fix calculation of the image height at start level", it is not needed. This commit removes the "warning: unused variable ‘i’" warning. Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glsl: Move string_to_uint_map into the util folderThomas Helland2016-09-127-375/+4
| | | | | | | | | | This clears the last bits of the usecases of the hash table located in mesa/program, allowing us to remove it. V2: Rebase on top of changes to Makefile.sources Signed-off-by: Thomas Helland <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: Convert symbol table to the util hash tableThomas Helland2016-09-121-7/+8
| | | | | Signed-off-by: Thomas Helland <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: Convert string_to_uint_map to the util hash tableThomas Helland2016-09-121-44/+22
| | | | | | | | | | | And remove the now unused hash_table_replace. V2: Actually do the equivalent thing, and don't leak memory V3: fix minor typo in comment (Timothy Arceri) Signed-off-by: Thomas Helland <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* util: Move hash_table_call_foreach to util hash tableThomas Helland2016-09-121-14/+0
| | | | | | | | | | It is included through the util/hash_table include in the program hash_table, so this should be safe. This will be needed when we start converting each use of the program_hash_table, as some places need this function. Signed-off-by: Thomas Helland <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: Remove prog_hash_table.cThomas Helland2016-09-124-82/+23
| | | | | | | | | | | | | Here we make the prog_hash_table functionally equivalent to the one in util by wrapping the remaing functions that differ. We also move the functions to the header so we can remove the c file. This enables us to do a step-by-step replacement of the table. Signed-off-by: Thomas Helland <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: Remove unused hash table includesThomas Helland2016-09-121-1/+0
| | | | | | | This should prevent us from rebuilding the world. Signed-off-by: Thomas Helland <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965: Fix calculation of the image height at start levelAntia Puentes2016-09-101-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fixes CTS tests: * GL44-CTS.shader_image_size.advanced-nonMS-cs-float * GL44-CTS.shader_image_size.advanced-nonMS-cs-int * GL44-CTS.shader_image_size.advanced-nonMS-cs-uint * GL44-CTS.shader_image_size.advanced-nonMS-gs-float * GL44-CTS.shader_image_size.advanced-nonMS-gs-int * GL44-CTS.shader_image_size.advanced-nonMS-gs-uint * GL44-CTS.shader_image_size.advanced-nonMS-tes-float * GL44-CTS.shader_image_size.advanced-nonMS-tes-int * GL44-CTS.shader_image_size.advanced-nonMS-tes-uint * GL44-CTS.shader_image_size.advanced-nonMS-vs-float * GL44-CTS.shader_image_size.advanced-nonMS-vs-int * GL44-CTS.shader_image_size.advanced-nonMS-vs-uint v1: (written by Dave Airlie) Always shift height images for levels. Fixed the CTS test. v2: Only shift height if the texture is not an 1D_ARRAY, it fixes assertion in GL44-CTS.texture_view.gettexparameter due to the original patch (Antia). v3: Remove the loop. Do not shift height either for 1D textures. Use an explicit switch and add an assertion (levels == 0) for multisampled textures (Jason). v4: Rectangle textures can not have levels either (Ilia Mirkin). Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Antia Puentes <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* android: depend on libmesa_genxml from i965 Android.gen.mkTapani Pälli2016-09-091-0/+2
| | | | | | | | Static library dependency is required to pull the generated XML headers into the generated C file. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* i965: release GLSL IR in LinkShader after it's not neededTapani Pälli2016-09-091-0/+11
| | | | | Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* i965/fs: Fail the shader compile instead of asserting when we can't spillJason Ekstrand2016-09-081-2/+3
| | | | | | | | | | | Blorp doesn't handle spilling so we set allow_spilling to false in that case. The blorp 16x MSAA resolve shader spills in 16-wide but not 8-wide. This commit makes it so that we fail the 16-wide compile and successfully fall back to 8-wide instead of just assert-failing when trying to compile the 16-wide shader. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* gallium: remove PIPE_BIND_TRANSFER_READ/WRITEMarek Olšák2016-09-082-7/+6
| | | | | | | | not used in any useful way Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* mesa/formatquery: limit ES target support, fix core context supportIlia Mirkin2016-09-061-7/+8
| | | | | | | | | | | | | | | | | First off, as late as ES 3.2, GetInternalformat only supports RENDERBUFFER and 2DMS(_ARRAY) targets. Secondly, the _mesa_has_ext helpers are very accurate... a little too accurate, some might say. If we only show an extension in compat profiles because core profiles have the functionality guaranteed, they will return false. Fix these to either check for a core profile explicitly, or to a different-but-identical extension available in core profile. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Matteo Bruni <[email protected]> Tested-by: Matteo Bruni <[email protected]> Cc: [email protected]
* main: GL_RGB10_A2UI does not come with GL 3.0/EXT_texture_integerIlia Mirkin2016-09-061-1/+7
| | | | | | | | | | | Add a separate extension check for that format. Prevents glTexImage from trying to find a matching format, which fails on drivers without support for this format. Fixes: sized-texture-format-channels (on a3xx) Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Cc: [email protected]
* vbo: increase VBO_SAVE_BUFFER_SIZE from 8k to 256k dwordsTim Rowley2016-09-061-1/+1
| | | | | | | | | | | | Increases the performance of legacy geometry-heavy apps still using display lists. Performance increase for a targeted testcase is on the order of 8x, and applications like ParaView 4.x (5.x uses no longer used display lists) improve by about 10%-20%. Reviewed-by: Mathias Fröhlich <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* Android: glsl: add rules to generate ir_expression*.h header filesRob Herring2016-09-063-4/+12
| | | | | | | | | | | | | | Recent changes to generate ir_expression*.h header files broke Android builds. This adds the generation rules. This change is complicated due to creating a circular dependency between libmesa_glsl, libmesa_nir, and libmesa_compiler. Normally, we add static libraries so that include paths are added even if there's no linking dependency. That is the case here. Instead, we explicitly add the include path using $(MESA_GEN_GLSL_H) to libmesa_compiler. This in turn requires shuffling the order of make includes. It also uncovered missing dependency tracking of glsl_parser.h. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: Fix types in _mesa_get_color_read_format().Kenneth Graunke2016-09-051-1/+1
| | | | | | | This is a mesa_format, not a GLenum. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* intel: Pull the guts of gen7_l3_state.c into a shared helperJason Ekstrand2016-09-032-333/+39
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* intel: Rename brw_get_device_name/info to gen_get_device_name/infoJason Ekstrand2016-09-037-7/+7
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* intel: s/brw_device_info/gen_device_info/Jason Ekstrand2016-09-0356-288/+288
| | | | | | | | | | | | | Generated by: sed -i -e 's/brw_device_info/gen_device_info/g' src/intel/**/*.c sed -i -e 's/brw_device_info/gen_device_info/g' src/intel/**/*.h sed -i -e 's/brw_device_info/gen_device_info/g' **/i965/*.c sed -i -e 's/brw_device_info/gen_device_info/g' **/i965/*.cpp sed -i -e 's/brw_device_info/gen_device_info/g' **/i965/*.h Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* intel: Add a new "common" library for more code sharingJason Ekstrand2016-09-037-668/+4
| | | | | | | The first thing to go in this new library is brw_device_info. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* main: add KHR_robustness to ES 3.2 extension requirementsIlia Mirkin2016-09-031-0/+1
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: fix noop_scissor range issue on width/heightJordan Justen2016-09-011-7/+7
| | | | | | | | | | | | | If scissor X or Y was set to a negative value then the previous code might have indicated noop scissors when the scissor range actually was masking a portion of the framebuffer. Since fb->_Xmin, _Xmax, _Ymin and _Ymax take scissors into account, we can use these to test for a noop scissor. Cc: [email protected] Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Jordan Justen <[email protected]>
* st/mesa: expose OES_geometry_shader and OES_texture_cube_map_arrayIlia Mirkin2016-08-311-0/+15
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* Introduce .editorconfigEric Engestrom2016-08-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | A few weeks ago, Jose Fonseca suggested [0] we use .editorconfig files to try and enforce the formatting of the code, to which Michel Dänzer suggested [1] we start by importing the existing .dir-locals.el settings. The first draft was discussed in the RFC [2]. These .editorconfig are a first step, one that has the advantage of requiring little to no intervention from the devs once the settings files are in place, but the settings are very limited. This does have the advantage of applying while the code is being written. This doesn't replace the need for more comprehensive formatting tools such as clang-format & clang-tidy, but those reformat the code after the fact. [0] https://lists.freedesktop.org/archives/mesa-dev/2016-June/121545.html [1] https://lists.freedesktop.org/archives/mesa-dev/2016-June/121639.html [2] https://lists.freedesktop.org/archives/mesa-dev/2016-July/123431.html Acked-by: Nicolai Hähnle <[email protected]> Acked-by: Eric Anholt <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>