summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: implement glGet for AMD_framebuffer_multisample_advancedMarek Olšák2018-08-044-0/+32
| | | | Reviewed-by: Brian Paul <[email protected]>
* glapi: define AMD_framebuffer_multisample_advanced and add its functionsMarek Olšák2018-08-042-0/+32
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: add storageSamples parameter to renderbuffer functionsMarek Olšák2018-08-045-20/+32
| | | | | | | It's just passed to other functions but otherwise unused. It will be used in following commits. Reviewed-by: Brian Paul <[email protected]>
* mesa: add switch case for GL 2.0 in _mesa_compute_version()Brian Paul2018-08-021-0/+2
| | | | | | | | | | Previously, I added a switch case for GL 2.1 (ed7a0770b881791dd697f3). I don't know of any driver which only supports GL 2.0, but adding this switch case avoids a failure if the app queries GL_SHADING_LANGUAGE_VERSION. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: replace binary constants with hexadecimal constants18.2-branchpointAndres Gomez2018-08-021-58/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The binary constant notation "0b" is a GCC extension. Instead, we use hexadecimal notation to fix the MSVC 2013 build: Compiling src\mesa\main\texcompress_astc.cpp ... texcompress_astc.cpp src\mesa\main\texcompress_astc.cpp(111) : error C2059: syntax error : 'bad suffix on number' ... src\mesa\main\texcompress_astc.cpp(1007) : fatal error C1003: error count exceeds 100; stopping compilation scons: *** [build\windows-x86-debug\mesa\main\texcompress_astc.obj] Error 2 scons: building terminated because of errors. v2: Fix wrong conversion (Ilia). Fixes: 38ab39f6501 ("mesa: add ASTC 2D LDR decoder") Cc: Marek Olšák <[email protected]> Cc: Brian Paul <[email protected]> Cc: Roland Scheidegger <[email protected]> Cc: Mike Lothian <[email protected]> Cc: Gert Wollny <[email protected]> Cc: Dieter Nützel <[email protected]> Cc: Ilia Mirkin <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: add ASTC 2D LDR decoderMarek Olšák2018-07-314-0/+1963
| | | | | | Tested-by: Mike Lothian <[email protected]> Tested-By: Gert Wollny <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* arb_gl_spirv: add calls to several nir loweringsAlejandro Piñeiro2018-07-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | For now we are just adding nir lowerings that are needed/mandatory to get things working. After everything is settled, we would start to add good-to-have lowerings. This patch adds the following calls: * nir_split_var_copits and nir_split_per_member_structs: as vulkan drivers are doing now. See commit b0c643d8f579a3e1e45a08f6d9de099f2c45898b ("spirv: Use NIR per-member splitting") for more info. Without this commit, piglit tests like this crashes: spec/arb_gl_spirv/execution/varying/block And in general most of the shaders that includes any kind of struct. * nir_copy_prop: after nir_deref_instr introduction, function calls need this. See commit "nir,spirv: Rework function calls" (c11833ab24dcba26de1b0a5805e35a5d6761514e) for more info. Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glspirv: Set last_vert_progNeil Roberts2018-07-311-0/+7
| | | | | | v2: simplify last_vert check (Timothy) Reviewed-by: Timothy Arceri <[email protected]>
* mesa: fix a typo (trivial)Tapani Pälli2018-07-311-1/+1
| | | | | | Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add glRenderbufferStorage support for EXT_texture_norm16 formatsTapani Pälli2018-07-311-3/+7
| | | | | | | | | These bits were missing, found when extending the Piglit test. Fixes: 7f467d4f73 "mesa: GL_EXT_texture_norm16 extension plumbing" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add switch case for GL 2.1 in _mesa_compute_version()Brian Paul2018-07-271-0/+3
| | | | | | | The xlib/swrast driver only supports GL 2.1. This patch fixes a crash if the app calls glGetString(GL_SHADING_LANGUAGE_VERSION). Reviewed-by: Neha Bhende <[email protected]>
* mesa: replace tabs with spaces in mipmap.cBrian Paul2018-07-271-28/+28
| | | | Trivial.
* mesa: whitespace clean-up in texstore.cBrian Paul2018-07-271-45/+50
| | | | Trivial.
* mesa: move var decls in texstore_rgba()Brian Paul2018-07-271-6/+8
| | | | | | Move them closer to where they're first used. Reviewed-by: Charmaine Lee <[email protected]>
* mesa: remove unneeded free() call in texstore_rgba()Brian Paul2018-07-271-1/+0
| | | | | | The pointer will always be NULL since that's what we just tested for. Reviewed-by: Charmaine Lee <[email protected]>
* mesa: GL_MESA_framebuffer_flip_y extension [v4]Fritz Koenig2018-07-278-17/+48
| | | | | | | | | | | | | | | | | | | | | | | | | Adds an extension to glFramebufferParameteri that will specify if the framebuffer is vertically flipped. Historically system framebuffers are vertically flipped and user framebuffers are not. Checking to see the state was done by looking at the name field. This adds an explicit field. v2: * updated spec language [for chadv] * correctly specifying ES 3.1 [for chadv] * refactor access to rb->Name [for jason] * handle GetFramebufferParameteriv [for chadv] v3: * correct _mesa_GetMultisamplefv [for kusmabite] v4: * update spec language [for chadv] * s/GLboolean/bool/g [for chadv] * s/InvertedY/FlipY/g [for chadv] * s/inverted_y/flip_y/g [for chadv] * assert changes [for chadv] Reviewed-by: Chad Versace <[email protected]>
* mesa: allow indirect draws with the default VAO and compatibility profileMarek Olšák2018-07-241-1/+2
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: Fix copy-paste error in ConservativeRasterDilateRange initializationDanylo Piliaiev2018-07-241-1/+1
| | | | | | | | Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Fixes: 4580617509d ("mesa: add support for nvidia conservative rasterization extensions") Reviewed-by: Emil Velikov <[email protected]>
* python: Use range() instead of xrange()Mathieu Bridon2018-07-241-2/+2
| | | | | | | | | | | | | | | | Python 2 has a range() function which returns a list, and an xrange() one which returns an iterator. Python 3 lost the function returning a list, and renamed the function returning an iterator as range(). As a result, using range() makes the scripts compatible with both Python versions 2 and 3. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: fix make check for AMD_performance_monitorMarek Olšák2018-07-191-0/+13
|
* mesa: remove dead code from api_loopbackMarek Olšák2018-07-191-17/+0
| | | | | | This should only contain functions not set in vtxfmt.c. Reviewed-by: Timothy Arceri <[email protected]>
* mesa: expose ARB_indirect_parameters in the compatibility profileMarek Olšák2018-07-192-5/+5
| | | | | | Reviewed-by: Timothy Arceri <[email protected]> (v1) v2: fix dispatch_sanity
* mesa: expose ARB_shader_viewport_layer_array in the compatibility profileMarek Olšák2018-07-191-1/+1
| | | | | | no changes needed for GL compat Reviewed-by: Timothy Arceri <[email protected]>
* mesa: expose ARB_ES3_1_compatibility in the compatibility profileMarek Olšák2018-07-191-1/+1
| | | | | | no changes needed for GL compat Reviewed-by: Timothy Arceri <[email protected]>
* Allow AMD_perfmon on GLES contextsEric Anholt2018-07-181-1/+1
| | | | | | v2: whitespace alignment fix Reviewed-by: Rob Clark <[email protected]>
* mesa: don't double incr/decr ActiveCountersRob Clark2018-07-181-4/+8
| | | | | | | | | | | | | Frameretrace ends up w/ excess calls to SelectPerfMonitorCountersAMD() which ends up re-enabling already enabled counters. Which causes ActiveCounters[group] to be double incremented for the same counter. This causes BeginPerfMonitorAMD() to fail. The AMD_performance_monitor spec doesn't say that an error should be generated in this case. So I think the safe thing to do is just safe- guard against excess increments/decrements. Signed-off-by: Rob Clark <[email protected]>
* mesa: fix error msg typoRob Clark2018-07-181-1/+1
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: handle a bunch of formats in IMPLEMENTATION_COLOR_READ_*Tomeu Vizoso2018-07-181-32/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Virgl could save a lot of work converting buffers in the host side between formats if Mesa supported a bunch of other formats when reading pixels. This commit adds cases to handle specific formats so that the values reported by the two calls match more closely the underlying native formats. In GLES is important that IMPLEMENTATION_COLOR_READ_* return the native format and data type because the spec only allows reading with those, besides GL_RGBA or GL_RGBA_INTEGER. Additionally, because virgl currently doesn't implement such conversions, this commit fixes several tests in dEQP-GLES3.functional.fbo.color.clear.*, when using virgl in the guest side. The logic is based on knowledge that is shared with _mesa_format_matches_format_and_type() but we cannot assert that the results match as we don't have all the starting information at both points. So leave the assert out and hope CI comes soon to save us all. v2: * Let R10G10B10A2_UINT fall back to GL_RGBA_INTEGER (Eric Anholt) * Assert with _mesa_format_matches_format_and_type (Eric Anholt) v3: * Remove the assert, as it won't be reliable (Eric Anholt) v4: * Use _mesa_is_format_integer in the fallback (Eric Anholt) v5: * Remove superfluous call to _mesa_uncompressed_format_to_type_and_comps (Eric Anholt) Reviewed-by: Gurchetan Singh <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Tomeu Vizoso <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* mesa: Add gl_shader_program param to ProgramBinarySerializeDriverBlobJordan Justen2018-07-092-1/+3
| | | | | | | | | | This might be required because some stages might generate different programs depending on the other stages in the program. For example, the i965 driver's tessellation control stage depends on the tessellation evaluation shader. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: Always call ProgramBinarySerializeDriverBlobJordan Justen2018-07-091-10/+8
| | | | | | | | | | | | | The driver may prefer to have a different blob for ARB_get_program_binary compared to the version saved out for the disk shader cache. Since they both use the driver_cache_blob field, we need to always give the driver the opportunity to fill in the driver_cache_blob when saving the program binary. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: Add disk shader cache driver blob callbackJordan Justen2018-07-091-0/+15
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: verify MaxVertexAttribStride for GLES 3.1Erik Faye-Lund2018-07-091-0/+1
| | | | | | | | | | | | | The OpenGL 3.1 specification, table Table 20.41 ("Implementation Dependent Values"), defines the minimum-maximum value for MAX_VERTEX_ATTRIB_STRIDE to be 2048. So we shouldn't enable OpenGL ES 3.1 on implementations where this isn't the case. Let's add a check for this Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: verify MaxVertexAttribStride for GL 4.4Erik Faye-Lund2018-07-091-0/+1
| | | | | | | | | | | | | The OpenGL 4.4 specification, table Table 23.55 ("Implementation Dependent Values"), defines the minimum-maximum value for MAX_VERTEX_ATTRIB_STRIDE to be 2048. So we shouldn't enable OpenGL 4.4 on implementations where this isn't the case. Let's add a check for this. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* python: Stop using the Python 2 exception syntaxMathieu Bridon2018-07-061-1/+1
| | | | | | | | | | | | | | We could have made this compatible with Python 3 by using: except Exception as e: But since none of this code actually uses the exception objects, let's just drop them entirely. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* python: Use the print functionMathieu Bridon2018-07-064-34/+40
| | | | | | | | | | | | In Python 2, `print` was a statement, but it became a function in Python 3. Using print functions everywhere makes the script compatible with Python versions >= 2.6, including Python 3. Signed-off-by: Mathieu Bridon <[email protected]> Acked-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* mesa: enable ARB_direct_state_access in OpenGL 4.5 compat profileTimothy Arceri2018-07-052-100/+100
| | | | | | | | | Its unlikely anyone will add proper ARB_direct_state_access compat support before we branch 18.2. Enabling the extension in 4.5 at least allows users to make use of MESA_GL_VERSION_OVERRIDE=4.5COMPAT for games like No Mans Sky. Reviewed-by: Marek Olšák <[email protected]>
* Shorten u_queue namesMarek Olšák2018-07-041-1/+1
| | | | | | | | There is a 15-character limit for thread names shared by the queue name and process name. Shorten the thread name to make space for the process name. Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glspirv: lower workgroup access to offsetsAntia Puentes2018-07-031-0/+1
| | | | | | This will perform the CS shared lowering. See 8761a04d0d93 Reviewed-by: Timothy Arceri <[email protected]>
* st/mesa/i965: Allow decompressing ETC2 to GL_RGBATomeu Vizoso2018-07-022-23/+36
| | | | | | | | | | | | | | | | | | | | | When Mesa itself implements ETC2 decompression, it currently decompresses to formats in the GL_BGRA component order. That can be problematic for drivers which cannot upload the texture data as GL_BGRA, such as Virgl when it's backed by GLES on the host. So this commit adds a flag to _mesa_unpack_etc2_format so callers can specify the optimal component order. In Gallium's case, it will be requested if the format isn't in PIPE_FORMAT_B8G8R8A8_SRGB format. For i965, it will remain GL_BGRA, as before. v2: * Remove unnecesary include (Emil Velikov) Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: add header for share bptc decompress functionsDenis Pauk2018-07-012-1434/+1760
| | | | | | | | | | | | | | | | | | | | | | Move shared bptc functions to texcompress_bptc_tmp.h: * fetch_rgba_unorm_from_block * fetch_rgb_float_from_block * compress_rgba_unorm * compress_rgb_float Create decompress functions: * decompress_rgba_unorm * decompress_rgb_float Functions will be reused in gallium/auxiliary code. v2: Add block decompress function v3: Move all shared code to header Suggested-by: Marek Olšák <[email protected]> Signed-off-by: Denis Pauk <[email protected]> CC: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: enable ARB_vertex_attrib_64bit in compat profileTimothy Arceri2018-06-303-13/+14
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add outstanding ARB_vertex_attrib_64bit dlist supportTimothy Arceri2018-06-301-0/+178
| | | | Reviewed-by: Marek Olšák <[email protected]>
* vbo_save: add support for doubles to display list codeDave Airlie2018-06-301-1/+1
| | | | | | Required for ARB_vertex_attrib_64bit compat profile support. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add compat profile support for ARB_multi_draw_indirectTimothy Arceri2018-06-301-1/+1
| | | | | | v2: add missing ARB_base_instance support Reviewed-by: Marek Olšák <[email protected]>
* mesa: make valid_draw_indirect_multi() accessible externallyTimothy Arceri2018-06-302-12/+15
| | | | | | | We will use this to add compat support to ARB_multi_draw_indirect in the following patch. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add ARB_draw_indirect support to compat profileTimothy Arceri2018-06-302-3/+2
| | | | | | v2: add missing ARB_base_instance support Reviewed-by: Marek Olšák <[email protected]>
* mesa: generate GL_INVALID_OPERATION using draw indirect in dlistTimothy Arceri2018-06-301-0/+47
| | | | | | | | The spec doesn't explicitly say to generate an error but since DrawArraysInstanced* and DrawElementsInstanced* do, it makes sense to do it for these functions also. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add missing display list support for ARB_compute_shaderTimothy Arceri2018-06-301-0/+39
| | | | | | | | | | | The extension is enabled for compat profile but there is currently no display list support. I filed a spec bug and it has been agreed that glDispatchComputeIndirect should generate an INVALID_OPERATION error when called during display list compilation. Reviewed-by: Marek Olšák <[email protected]>
* mesa: expose some ARB_viewport_array dependent extensions in compatTimothy Arceri2018-06-301-2/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: enable ARB_viewport_array in compat profileTimothy Arceri2018-06-302-9/+10
| | | | Reviewed-by: Marek Olšák <[email protected]>