summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa/gl: Sync with Khronos registryHeinrich Fink2019-09-161-1/+1
| | | | | | | | | | | | | | | | | | Update GL headers and xml API from upstream Khronos registry (commit 3d0c3eb). Keep `BUILDING_MESA` quirk in glext.h. mesa/extensions: Expose EXT_EGL_sync instead of MESA_EGL_sync to reflect Khronos request of changing this extension's scope from MESA to EXT. EGL_EGL_sync is also the name of the extension that has been merged into the upstream Khronos GL registry. Remove MESA_EGL_sync spec txt from Mesa tree as it is now published as EXT by Khronos. v1: Remove MESA_EGL_sync spec and squash commits (Eric E) Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* mesa: fix texStore for FORMAT_Z32_FLOAT_S8X24_UINTJiadong Zhu2019-09-121-3/+3
| | | | | | | | | | | | _mesa_texstore_z32f_x24s8 calculates source rowStride at a pace of 64-bit, this will make inaccuracy offset if the width of src image is an odd number. Modify src pointer to int_32* as source image format is gl_float which is 32-bit per pixel. Reviewed by Ilia Mirkin Signed-off-by: Jiadong Zhu <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa/spirv: Set a few more extensionsCaio Marcelo de Oliveira Filho2019-09-101-0/+3
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* mesa: Eliminate gl_config::rgbModeAdam Jackson2019-09-093-3/+0
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Eliminate gl_config::have{Accum,Depth,Stencil}BufferAdam Jackson2019-09-095-15/+4
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Remove unused gl_config::indexBitsAdam Jackson2019-09-093-4/+1
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl: Add GL_MESA_EGL_sync supportHeinrich Fink2019-09-081-0/+1
| | | | | | | | This commit follow OES_EGL_sync to universially enable use of EGL sync objects with desktop OpenGL contexts. Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: Plumb through a way to disable GLSL const loweringConnor Abbott2019-09-052-0/+7
| | | | | | | | | | For radeonsi, we will prefer the NIR pass as it'll generate better code (some index calculation and a single load vs. a load, then index calculation, then another load) and oftentimes NIR optimization can kick in and make all the access indices constant. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* headers: remove redundant GL token from GL wrapperHeinrich Fink2019-09-051-4/+0
| | | | | | | | Removing GL_FRAMEBUFFER_FLIP_Y_MESA token from glheader.h as it is now provided by glext.h Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* teximage: ensure that Tex*SubImage* checks formatIlia Mirkin2019-09-041-0/+9
| | | | | | | | | We were previously not doing at least some of the checks. This uses the same logic that is used in glTexImage*. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa/main: remove unused includeErik Faye-Lund2019-09-021-1/+0
| | | | | | | | This has been unused since 183db3a6455 ("glsl: move half<->float convertion to util"), Oct 10 2015. Let's drop needlessly including it. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: Fix _mesa_float_to_unorm() on 32-bit systems.Kenneth Graunke2019-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following CTS test on 32-bit systems: GTF-GL46.gtf30.GL3Tests.packed_depth_stencil.packed_depth_stencil_init It does glGetTexImage of a 16-bit SNORM image, requesting 32-bit UNORM data. In get_tex_rgba_uncompressed, we round trip through float to handle image transfer ops for clamping. _mesa_format_convert does: _mesa_float_to_unorm(0.571428597f, 32) which translated to: _mesa_lroundevenf(0.571428597f * 0xffffffffu) which produced different results on 64-bit and 32-bit systems: 64-bit: result = 0x92492500 32-bit: result = 0x80000000 This is because the size of "long" varies between the two systems, and 0x92492500 is too large to fit in a signed 32-bit integer. To fix this, we switch to the new _mesa_i64roundevenf function which always does the 64-bit operation. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104395 Fixes: 594fc0f8595 ("mesa: Replace F_TO_I() with _mesa_lroundevenf().") Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: recover target_check before get_current_tex_objectsJose Maria Casanova Crespo2019-08-211-7/+7
| | | | | | | | | | | | | | | | | At compressed_tex_sub_image we only can obtain the tex_object after compressed_subtexture_target_check is validated for TEX_MODE_CURRENT. So if the target is wrong the error is raised to the user. This completes the fix for the regression introduced on "mesa: refactor compressed_tex_sub_image function" of the pending failing tests: dEQP-GLES3.functional.negative_api.texture.compressedtexsubimage3d dEQP-GLES31.functional.debug.negative_coverage.get_error.texture.compressedtexsubimage3d v2: Fix warning that texObj might be used uninitialized (Gert Wollny) Fixes: 7df233d68dc ("mesa: refactor compressed_tex_sub_image function") Reviewed-By: Gert Wollny <[email protected]>
* dri: Add config attributes for color channel shiftKevin Strasser2019-08-212-3/+7
| | | | | | | | | | | | | | | The existing mask attributes can only support up to 32 bpp. Introduce per-channel SHIFT attributes that indicate how many bits, from lsb towards msb, the bit field is offset. A shift of -1 will indicate that there is no bit field set for the channel. As old loaders will still be looking for masks, we set the masks to 0 for any formats wider than 32 bpp. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa/version: uncomment SPIR-V extensionsAlejandro Piñeiro2019-08-211-2/+2
| | | | | | As they are implemented on i965, so we can expose 4.6. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* mesa/compiler: rework tear down of builtin/typesLionel Landwerlin2019-08-213-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | The issue we're running into when running CTS is that glsl types are deleted while builtins depending on them are not. This happens because on one hand we have glsl types ref counted, but builtins are not. Instead builtins are destroyed when unloading libGL or explicitly calling glReleaseShaderCompiler(). This change removes almost entirely any dealing with glsl types ref/unref by letting the builtins deal with it instead. In turn we introduce a builtin ref count mechanism. Each GL context takes a reference on the builtins when compiling a shader for the first time. It releases the reference when the context is destroyed. It can also explicitly release those when glReleaseShaderCompiler() is called. Finally we also take a reference on the glsl types when loading libGL to avoid recreating glsl types too often. v2: Ensure we take a reference if we don't have one in link step (Lionel) Signed-off-by: Lionel Landwerlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110796 Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: reverse no_error on compressed_tex_sub_image for TEX_MODE_CURRENTJose Maria Casanova Crespo2019-08-201-2/+2
| | | | | | | | | This fixes the regression introduced on "mesa: refactor compressed_tex_sub_image function" that started to crash KHR-GLES2.texture_3d.compressed_texture.negative_compressed_tex_sub_image Fixes: 7df233d68dc ("mesa: refactor compressed_tex_sub_image function") Reviewed-by: Eric Anholt <[email protected]>
* mesa: add ext_dsa GetMultiTexLevelParameterEXTPierre-Eric Pelloux-Prayer2019-08-193-2/+57
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glCompressedMultiTex* functions display list supportPierre-Eric Pelloux-Prayer2019-08-191-0/+276
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glCompressedMultiTex* functionsPierre-Eric Pelloux-Prayer2019-08-195-12/+196
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glCompressedTex* functions display list supportPierre-Eric Pelloux-Prayer2019-08-191-0/+239
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glCompressedTexture(Sub)Image1D/2D/3D functionsPierre-Eric Pelloux-Prayer2019-08-195-6/+152
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: refactor compressed_tex_sub_image functionPierre-Eric Pelloux-Prayer2019-08-191-101/+115
| | | | | | | | | | Combine compressed_tex_sub_image, compressed_tex_sub_image_error and compressed_tex_sub_image_no_error in a single function. The added "enum tex_mode mode" parameter allows to implement the DSA / non-DSA variants and their error/no_error combination. Reviewed-by: Marek Olšák <[email protected]>
* win32: unify strcasecmp definitionsErik Faye-Lund2019-08-151-3/+0
| | | | | | | | | There was two incompatible definitions of strcasecmp, which lead to a compiler warning. Let's clean this up by only leaving one of them, and using that one all the time. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/main: avoid warning when casting offset to pointerErik Faye-Lund2019-08-151-1/+1
| | | | | | | | This generates a warning on some 64-bit systems, so let's cast to a properly sized integer first. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/spirv: Lower shared memory laterCaio Marcelo de Oliveira Filho2019-08-101-1/+0
| | | | | | | | | | | Instead of asking spirv_to_nir to lower the workgroup (shared memory) to offsets, keep them as derefs longer, then lower it later on. Because Workgroup memory doesn't have explicit offsets, we need to set those using nir_lower_vars_to_explicit_types before calling the I/O lowering pass. Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: be consistent on GL_TRUE/GL_FALSE & TRUE/FALSELionel Landwerlin2019-08-092-3/+3
| | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* mesa: drop some p_compiler.h typesLionel Landwerlin2019-08-091-2/+2
| | | | | | Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* mesa/main: cast away constnessErik Faye-Lund2019-08-081-1/+1
| | | | | | | | This avoids a warning about implicitly casting away the constness of the pointer. Signed-off-by: Erik Faye-Lund <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* mesa: Use _mesa_delete_transform_feedback_object in driversYevhenii Kolesnikov2019-08-072-17/+27
| | | | | | | | | | | | | Function _mesa_delete_transform_feedback_object called from within drivers once driver-specific clean-up has been done. Brings into conformity with how other GL objects are handled. CC: Eric Anholt <[email protected]> CC: Kenneth Graunke <[email protected]> Signed-off-by: Yevhenii Kolesnikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* mesa: use _mesa_delete_query in driversYevhenii Kolesnikov2019-08-072-2/+10
| | | | | | | | | | | | | | Now drivers can call _mesa_delete_query once driver-specific clean-up has been done. Brings into conformity with how other GL objects are handled. CC: Eric Anholt <[email protected]> CC: Kenneth Graunke <[email protected]> Suggested-by: Eric Anholt <[email protected]> Signed-off-by: Yevhenii Kolesnikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* mesa: remove super old TODOs from shaderapi.cTimothy Arceri2019-08-071-5/+0
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa/gallium: add dric option to allow overriding GL vendor stringTimothy Arceri2019-08-072-0/+6
| | | | | | | Will be used in the following patch. Reviewed-by: Marek Olšák <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93551
* mesa: add EXT_shader_image_load_store glBindImageTextureEXT functionPierre-Eric Pelloux-Prayer2019-08-063-9/+47
| | | | | | | The implementation is almost identical to glBindImageTexture except for error checking. Reviewed-by: Marek Olšák <[email protected]>
* glapi: add EXT_shader_image_load_storePierre-Eric Pelloux-Prayer2019-08-062-0/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glMultiTexCoordPointerEXT functionPierre-Eric Pelloux-Prayer2019-08-063-2/+30
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glMultiTexGen* functionsPierre-Eric Pelloux-Prayer2019-08-063-145/+262
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glCopyMultiTexImage* and glCopyMultiTexSubImage*Pierre-Eric Pelloux-Prayer2019-08-064-5/+308
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glGetMultiTexParameteriv/fvEXTPierre-Eric Pelloux-Prayer2019-08-063-3/+49
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glMultiTexSubImage1D/2D/3DEXTPierre-Eric Pelloux-Prayer2019-08-064-3/+231
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glMultiTexImage1D/2D/3DEXT + glGetMultiTexImageEXTPierre-Eric Pelloux-Prayer2019-08-066-5/+299
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add glBindMultiTextureEXT display list supportPierre-Eric Pelloux-Prayer2019-08-061-0/+23
| | | | | | Fixes: 0972b0b059d ("mesa: add support for glBindMultiTextureEXT") Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa glMultiTexParameter* functionsPierre-Eric Pelloux-Prayer2019-08-064-4/+192
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add EXT_dsa (Get)MultiTexEnv functionsPierre-Eric Pelloux-Prayer2019-08-063-1/+175
| | | | Reviewed-by: Marek Olšák <[email protected]>
* mesa: add _mesa_(get)texenvi(f)v_indexed helpersPierre-Eric Pelloux-Prayer2019-08-061-27/+50
| | | | | | | They are exactly like _mesa_GetTexEnvfv/_mesa_GetTexEnviv except they take a GLuint texunit parameter instead of relying of ctx->Texture.CurrentUnit. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add new helper _mesa_get_texobj_by_target_and_texunitPierre-Eric Pelloux-Prayer2019-08-063-43/+82
| | | | | | | Based on the 'static get_texobj_by_target' function from texparam.c, but extended to also take the texunit as a parameter. Reviewed-by: Marek Olšák <[email protected]>
* mesa: replace _mesa_get_current_fixedfunc_tex_unit with ↵Pierre-Eric Pelloux-Prayer2019-08-064-12/+10
| | | | | | | | | | _mesa_get_fixedfunc_tex_unit The new function implements the same feature but doesn't depend on ctx->Texture.CurrentUnit. This change allows to use it from indexed functions. Reviewed-by: Marek Olšák <[email protected]>
* mesa: add an ASSERTEDEric Engestrom2019-07-311-1/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* tree-wide: replace MAYBE_UNUSED with ASSERTEDEric Engestrom2019-07-311-1/+1
| | | | | | Suggested-by: Jason Ekstrand <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: replace MAYBE_UNUSED with UNUSEDEric Engestrom2019-07-311-2/+2
| | | | | | | | MAYBE_UNUSED is going away, so let's replace legitimate uses of it with UNUSED, which the former aliased to so far anyway. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>