aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
Commit message (Collapse)AuthorAgeFilesLines
* mesa: add bool param to _mesa_free_context_dataPierre-Eric Pelloux-Prayer2020-07-151-1/+1
| | | | | | | | The param controls whether _mesa_destroy_debug_output should be called or not. No functional changes; this will be used by the next commit. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5789>
* util: rename xmlpool.h to driconf.hEric Engestrom2020-06-221-1/+1
| | | | | | | To make it clearer what it is and does. Signed-off-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440>
* driconf: drop now unused translation facilityEric Engestrom2020-06-222-5/+5
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5440>
* meson: use gnu_symbol_visibility argumentDylan Baker2020-06-011-2/+2
| | | | | | | | | | This uses a meson builtin to handle -fvisibility=hidden. This is nice because we don't need to track which languages are used, if C++ is suddenly added meson just does the right thing. Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
* mesa: replace GLenum target with gl_shader_stage in NewProgramMarek Olšák2020-04-271-7/+7
| | | | | | | | So that the GLSL compiler doesn't have to use the GLenum conversion functions. Reviewed-by: Timothy Arceri <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4756>
* remove final imports.h and imports.c bitsDylan Baker2020-04-218-51/+45
| | | | | | | | | | | This moves the fi_types to a new mesa_private.h and removes the imports.c file. The vast majority of this patch is just removing pound includes of imports.h and fixing up the recursive includes. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* replace imports memory functions with utils memory functionsDylan Baker2020-04-211-15/+14
| | | | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* replace malloc macros in imports.h with u_memory.h versionsDylan Baker2020-04-214-0/+4
| | | | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* replace _mesa_is_pow_two with util_is_power_of_two_*Dylan Baker2020-04-211-1/+1
| | | | | | | | | | | | | Mostly this uses util_is_power_of_two_or_zero, which has the same behavior as _mesa_is_pow_two when the input is zero. In cases where the value is known to be != 0 ahead of time I used the _nonzero variant as it may be faster on some platforms. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
* mesa: remove no longer needed _mesa_is_bufferobj functionMarek Olšák2020-04-063-5/+5
| | | | | | | | | | All buffers have Name != 0. Note that there is no longer the pointer dereference to get Name, so it's faster. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466>
* meson: inline `inc_common`Eric Engestrom2020-03-281-1/+1
| | | | | | | | | Let's make it clear what includes are being added everywhere, so that they can be cleaned up. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4360>
* Move compiler.h and imports.h/c from src/mesa/main into src/utilMarek Olšák2020-03-279-9/+10
| | | | | Reviewed-by: Timothy Arceri <[email protected] Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4324>
* vbo: merge use_buffer_objects into vbo_CreateContext to skip the big mallocMarek Olšák2020-02-111-1/+1
| | | | | Reviewed-by: Mathias Fröhlich <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3766>
* mesa: Silence unused parameter warningIan Romanick2019-12-041-1/+1
| | | | | | | | | | | | | Unused since e4da8b9c331 ("mesa/compiler: rework tear down of builtin/types"). src/mesa/main/context.c: In function ‘_mesa_free_context_data’: src/mesa/main/context.c:1321:54: warning: unused parameter ‘destroy_compiler_types’ [-Wunused-parameter] 1321 | _mesa_free_context_data(struct gl_context *ctx, bool destroy_compiler_types) | ^ Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* i915: replace xmlpool_options_h with idep_xmlconfig_headersEric Engestrom2019-10-311-2/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* mesa: Replace MESA_FORMAT_L8A8/A8L8 UNORM/SNORM/SRGB with an array format.Eric Anholt2019-10-203-3/+3
| | | | | | | | | | | | | | | | | The array format is what the GL API wants (fixing texbos on big-endian), and matches directly to gallium's corresponding array format. The only driver exposing A8L8 was radeon/r200 in big-endian, where the HW's underlying format was trying to read as array and we needed to flip things around to make our packed format come out right (note that while the radeon format tables had both AL and LA, ChooseTextureFormat would only pick one of them based on endianness). v2: Don't make r200/radeon use endian swaps. v3: Rebase on dropping the r200 _be/_le format table removal patch v4: reword commit message to explain why we can drop both formats from radeon. Reviewed-by: Marek Olšák <[email protected]> (v1)
* driconfig: add a new engine name/version parameterLionel Landwerlin2019-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vulkan applications can register with the following structure : typedef struct VkApplicationInfo { VkStructureType sType; const void* pNext; const char* pApplicationName; uint32_t applicationVersion; const char* pEngineName; uint32_t engineVersion; uint32_t apiVersion; } VkApplicationInfo; This enables the Vulkan implementations to apply workarounds based off matching this description. Here we add a new parameter for matching the driconfig options with the following : <device driver="anv"> <application engine_name_match="MyOwnEngine.*" engine_versions="10:12,40:42"> <option name="blaaah" value="true" /> </application> </device> v2: switch engine name match to use regexps v3: Verify that the regexec returns REG_NOMATCH for match failure (Eric) v4: Add missing bit that went to the following commit (Eric) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: 19.2 <[email protected]>
* dri: Use DRM_FORMAT_* instead of defining our own copy.Eric Anholt2019-09-111-11/+12
| | | | | | | | | | | | We have only two defines that aren't from DRM_FORMAT_*: SARGB and SABGR. Keep only those as __DRI_IMAGE_FOURCC and garbage collect the rest. While this header is also used from the X server, the X server doesn't use any __DRI_IMAGE enums. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* meson: Search for execinfo.hJory Pratt2019-06-191-1/+1
| | | | | | | | | | Rather than checking __GLIBC__/__UCLIBC__ macros as a proxy for execinfo.h presence, just check directly. This allows the build to work on musl. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* mesa: Replace MaxTextureLevels with MaxTextureSize.Eric Anholt2019-05-132-2/+2
| | | | | | | | | | In most places (glGetInteger, max_legal_texture_dimensions), we wanted the number of pixels, not the number of levels. Number of levels is easily recovered with util_next_power_of_two() and ffs(). More importantly, for V3D we want to be able to expose a non-power-of-two maximum texture size to cover 2x4k displays on HW that can't quite do 8192 wide. Reviewed-by: Marek Olšák <[email protected]>
* meson: lift driver-collection out into parent build-fileErik Faye-Lund2019-05-021-3/+0
| | | | | | | | | | This way we can mark the dri_drivers and dri_link arrays as temporary, as all knowledge about them are contained in a single build-file with clearly visible limited life-span. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* st/mesa/radeonsi: fix race between destruction of types and shader compilationTimothy Arceri2019-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 624789e3708c moved the destruction of types out of atexit() and made use of a ref count instead. This is useful for avoiding a crash where drivers such as radeonsi are still compiling in a thread when the app exits and has not called MakeCurrent to change from the current context. While the above scenario is technically an app bug we shouldn't crash. However that change caused another race condition between the shader compilation tread in radeonsi and context teardown functions. This patch makes two changes to fix this new problem: First we explicitly call _mesa_destroy_shader_compiler_types() when destroying the st context rather than calling it indirectly via _mesa_free_context_data(). We do this as we must call it after st_destroy_context_priv() so that we don't destory the glsl types before the compilation threads finish. Next wait for the shader threads to finish in si_destroy_context() this also means we need to call context destroy before destroying the queues in si_destroy_screen(). Fixes: 624789e3708c ("compiler/glsl: handle case where we have multiple users for types") Reviewed-by: Marek Olšák <[email protected]>
* Delete autotoolsDylan Baker2019-04-151-43/+0
| | | | | | | | | | Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Marek Olšák <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Matt Turner <[email protected]>
* mesa: rename logging functions to reflect that they format stringsMark Janes2019-03-142-14/+14
| | | | | | | In preparation for the definition of a function to log a formatted string. Reviewed-by: Erik Faye-Lund <[email protected]>
* drm-uapi: use local files, not system libdrmEric Engestrom2019-02-144-5/+5
| | | | | | | | | There was an issue recently caused by the system header being included by mistake, so let's just get rid of this include path and always explicitly #include "drm-uapi/FOO.h" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* i915: Delete swizzling detection logic.Kenneth Graunke2018-11-174-31/+0
| | | | | | | This is all leftover from the i965 split. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* i915: reference __DRI_ATTRIB_SWAP_COPY token over the GLX oneEmil Velikov2018-10-031-1/+1
| | | | | | | | Earlier commit updated the code to use the DRI tokens, yet forgot to update the comment. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: drop legacy no_rast dri optionTimothy Arceri2018-08-212-2/+1
| | | | | | Add enviroment var overrides to legacy drivers instead. Reviewed-by: Kenneth Graunke <[email protected]>
* i915: remove early_z dri optionTimothy Arceri2018-08-214-16/+0
| | | | | | | This driver is in maintenance mode so lets remove this hidden unsafe option. Reviewed-by: Kenneth Graunke <[email protected]>
* xmlconfig: add kernel_driver device attributeQiang Yu2018-08-171-1/+1
| | | | | | | | | This attribute can be used by loader to apply different option to device use specific kernel driver. Signed-off-by: Qiang Yu <[email protected]> Acked-by: Michel Dänzer <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri: Add param driCreateConfigs(mutable_render_buffer)Chad Versace2018-08-071-2/+2
| | | | | | | | | If set, then the config will have __DRI_ATTRIB_MUTABLE_RENDER_BUFFER, which translates to EGL_MUTABLE_RENDER_BUFFER_BIT_KHR. Not used yet. Reviewed-by: Tapani Pälli <[email protected]>
* mesa: GL_MESA_framebuffer_flip_y extension [v4]Fritz Koenig2018-07-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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: remove struct gl_extensions::ATI_separate_stencilEmil Velikov2018-06-211-1/+0
| | | | | | | | | | | | Virtually every driver that supports ATI_separate_stencil also supports EXT_stencil_two_side. Use the latter boolean for both extension. With that in mind we can drop the explicit true from the drivers and the nasty comment in compute_version(). Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* dri: fix error value returned by driGLFormatToImageFormat()Eric Engestrom2018-05-291-1/+1
| | | | | | | | | | | | 0 is not a valid value for the __DRI_IMAGE_FORMAT_* enum. It is, however, the value of MESA_FORMAT_NONE, which two of the callers (i915 & i965) checked for. The other callers (that check for errors, ie. st/dri) already check for __DRI_IMAGE_FORMAT_NONE. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* android: change include "cutils/log.h" to "log/log.h" on Android API >=26jenny.q.cao2018-05-141-0/+4
| | | | | | | | | There is a compile warning from Android 8 (API version 26) from "include cutils/log.h" warning: "Deprecated: don't include cutils/log.h, use either android/log.h or log/log.h"-W#warnings, Change to include "log/log.h" on Android 8 or later major version to avoid this warning Signed-off-by: jenny.q.cao <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* mesa: add GLSLVersionCompat constantTimothy Arceri2018-05-091-0/+1
| | | | | | | | This allows drivers to define what version of GLSL they support in compat. This will be needed in order to support compat 3.2 without breaking drivers that wont support it. Reviewed-by: Marek Olšák <[email protected]>
* mesa: drop the buffer mode param from the DrawBuffer driver functionTimothy Arceri2018-04-271-1/+1
| | | | | | No drivers used it. Reviewed-by: Brian Paul <[email protected]>
* mesa: include mtypes.h lessMarek Olšák2018-04-121-0/+1
| | | | | | | | | | - remove mtypes.h from most header files - add main/menums.h for often used definitions - remove main/core.h v2: fix radv build Reviewed-by: Brian Paul <[email protected]>
* tnl: Push down the gl_vertex_array inputs into tnl drivers.Mathias Fröhlich2018-03-311-0/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* mesa: rework ParameterList to allow packingTimothy Arceri2018-03-201-4/+5
| | | | | | | | | | | | | | Currently everything is padded to 4 components. Making the list more flexible will allow us to do uniform packing. V2 (suggestions from Nicolai): - always pass existing calls to _mesa_add_parameter() true for padd_and_align - fix bindless param value offsets - remove left over wip logic from pad and align code - zero out param value padding - whitespace fix Reviewed-by: Marek Olšák <[email protected]>
* mesa: separate legacy stuff from gl_texture_unit into gl_fixedfunc_texture_unitMarek Olšák2018-02-131-1/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: change ctx->Color.ColorMask into a 32-bit bitmaskMarek Olšák2018-02-043-12/+3
| | | | | | | | 4 bits per draw buffer, 8 draw buffers in total --> 32 bits. This is easier to work with. Reviewed-by: Eric Anholt <[email protected]>
* i915: Silence unused parameter warningsIan Romanick2018-01-261-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c: In function ‘intel_alloc_window_storage’: ../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:290:48: warning: unused parameter ‘ctx’ [-Wunused-parameter] intel_alloc_window_storage(struct gl_context * ctx, struct gl_renderbuffer *rb, ^~~ ../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c: In function ‘intel_nop_alloc_storage’: ../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:303:74: warning: unused parameter ‘rb’ [-Wunused-parameter] intel_nop_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *rb, ^~ ../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:304:32: warning: unused parameter ‘internalFormat’ [-Wunused-parameter] GLenum internalFormat, GLuint width, GLuint height) ^~~~~~~~~~~~~~ ../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:304:55: warning: unused parameter ‘width’ [-Wunused-parameter] GLenum internalFormat, GLuint width, GLuint height) ^~~~~ ../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:304:69: warning: unused parameter ‘height’ [-Wunused-parameter] GLenum internalFormat, GLuint width, GLuint height) ^~~~~~ ../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c: In function ‘intel_bind_framebuffer’: ../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:396:47: warning: unused parameter ‘fb’ [-Wunused-parameter] struct gl_framebuffer *fb, struct gl_framebuffer *fbread) ^~ ../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:396:74: warning: unused parameter ‘fbread’ [-Wunused-parameter] struct gl_framebuffer *fb, struct gl_framebuffer *fbread) ^~~~~~ ../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c: In function ‘intel_renderbuffer_update_wrapper’: ../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:422:57: warning: unused parameter ‘intel’ [-Wunused-parameter] intel_renderbuffer_update_wrapper(struct intel_context *intel, ^~~~~ ../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c: In function ‘intel_blit_framebuffer_with_blitter’: ../../SOURCE/master/src/mesa/drivers/dri/i915/intel_fbo.c:644:61: warning: unused parameter ‘filter’ [-Wunused-parameter] GLbitfield mask, GLenum filter) ^~~~~~ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* i915: Make intelEmitCopyBlit staticIan Romanick2018-01-263-167/+149
| | | | | | | | | | And rename to emit_copy_blit. v2: sed --in-place -e 's/color_logic_ops/gl_logicop_mode/g' $(grep -lr color_logic_ops src/) suggested by Brian. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> [v1]
* i915: Use enum color_logic_ops for blitsIan Romanick2018-01-2610-40/+22
| | | | | | | | v2: sed --in-place -e 's/color_logic_ops/gl_logicop_mode/g' $(grep -lr color_logic_ops src/) suggested by Brian. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> [v1]
* mesa: Pass the translated color logic op dd_function_table::LogicOpcodeIan Romanick2018-01-265-51/+8
| | | | | | | | | | | And delete the resulting dead code. This has only been compile-tested. v2: sed --in-place -e 's/color_logic_ops/gl_logicop_mode/g' $(grep -lr color_logic_ops src/) suggested by Brian. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* autotools: include meson build files in tarballDylan Baker2018-01-191-0/+2
| | | | | | | | | | | | This adds the meson.build, meson_options.txt, and a few scripts that are used exclusively by the meson build. v2: - Remove accidentally included changes needed to test make dist with LLVM > 3.9 Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* i915: No longer rely on compatability define in intel_bufmgr.hRhys Kidd2018-01-171-1/+1
| | | | | | | | | | | Symbol rename from dri_* to drm_intel_* introduced a number of compatability defines within intel_bufmgr.h. Replace the old function with the new function, consistent with the balance of this file. Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i915: add missing 0 definesEric Engestrom2017-12-121-0/+2
| | | | | | | | | | | Thanks to Emil's -Wundef, t_dd_dmatmp.h now complains that intel_render.c is missing a couple `#define`s. Assigning them to 0 keeps the existing behaviour; I'll let someone else turn them on if this is the behaviour that was intended. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i915: add missing extensions.h includeEmil Velikov2017-11-162-0/+2
| | | | | | | | | | | Otherwise we'll bail with due to -Werror=implicit-function-declaration. It went unnoticed since the we had a bug which did consistently set the compiler flag. Fixes: ba8a347f932 ("mesa: split extensions overrides and glGetString(GL_EXTENSIONS)") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Andres Gomez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>