aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915/intel_screen.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Rename 4 color component unsigned byte MESA_FORMATsMark Mueller2014-01-271-5/+5
| | | | | | | | | | | | | Change all 4 color component unsigned byte formats to meet spec for P Type formats: s/MESA_FORMAT_RGBA8888\b/MESA_FORMAT_A8B8G8R8_UNORM/g s/MESA_FORMAT_RGBA8888_REV\b/MESA_FORMAT_R8G8B8A8_UNORM/g s/MESA_FORMAT_ARGB8888\b/MESA_FORMAT_B8G8R8A8_UNORM/g s/MESA_FORMAT_ARGB8888_REV\b/MESA_FORMAT_A8R8G8B8_UNORM/g s/MESA_FORMAT_RGBX8888\b/MESA_FORMAT_X8B8G8R8_UNORM/g s/MESA_FORMAT_RGBX8888_REV\b/MESA_FORMAT_R8G8B8X8_UNORM/g s/MESA_FORMAT_XRGB8888\b/MESA_FORMAT_B8G8R8X8_UNORM/g s/MESA_FORMAT_XRGB8888_REV\b/MESA_FORMAT_X8R8G8B8_UNORM/g
* mesa: change gl_format to mesa_formatMark Mueller2014-01-271-2/+2
| | | | s/\bgl_format\b/mesa_format/g. Use better name for Mesa Formats enum
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <[email protected]>
* dri_util: Don't assume __DRIcontext->driverPrivate is a gl_contextKristian Høgsberg2013-12-131-4/+6
| | | | | | | | | | | | | | | | | The driverPrivate pointer is opaque to the driver and we can't assume it's a struct gl_context in dri_util.c. Instead provide a helper function to set the struct gl_context flags from the incoming DRI context flags. v2 (idr): Modify the other classic drivers to also use driContextSetFlags. I ran all the piglit GLX_ARB_create_context tests with i965 and classic swrast without regressions. Signed-off-by: Kristian Høgsberg <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ian Romanick <[email protected]> [v1] Reviewed-by: Eric Anholt <[email protected]> Tested-by: Ilia Mirkin <[email protected]> [v1 on Gallium nouveau] Cc: "10.0" <[email protected]>
* i915: Actually enable __DRI2rendererQueryExtensionRecIan Romanick2013-11-151-0/+1
| | | | | | | | | | | | | | | | | | More rebase fail. This code was written long before i915 and i965 were split, so most of the code in i9[16]5/intel_screen.c only needed to exist in one place. It looks like I fixed n-1 of those places after rebasing on the split. I only found this from the defined-but-not-used warning for intelRendererQueryExtension. I noticed this while fixing the other, related warnings. (Note: During review, we decided to *not* pick this back to 10.0.) Signed-off-by: Ian Romanick <[email protected]> Cc: Daniel Vetter <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* dri: Change value param to unsignedIan Romanick2013-11-131-1/+1
| | | | | | | | | This silences some compiler warnings in i915 and i965. See also 75982a5. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "10.0" <[email protected]>
* i915: Use drm_intel_get_aperture_sizes instead of drmAgpSizeIan Romanick2013-11-131-2/+6
| | | | | | | | Send the zombie back to the grave before it infects the townsfolk. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Cc: "10.0" <[email protected]>
* dri/i915, dri/i965: Fix support for planar imagesAnder Conselvan de Oliveira2013-11-121-1/+2
| | | | | | | | | | | Planar images have format __DRI_IMAGE_FORMAT_NONE, but the patch that moved the conversion from dri_format to the mesa format made it impossible to allocate a image with that format. Signed-off-by: Ander Conselvan de Oliveira <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Cc: "10.0" <[email protected]>
* dri: add __DRIimageLoaderExtension and __DRIimageDriverExtensionKeith Packard2013-11-071-0/+1
| | | | | | | | | | | | | | | | | | | | | These provide an interface between the driver and the loader to allocate color buffers through the DRIimage extension interface rather than through a loader-specific extension (as is used by DRI2, for instance). The driver uses the loader 'getBuffers' interface to allocate color buffers. The loader uses the createNewScreen2, createNewDrawable, createNewContext, getAPIMask and createContextAttribs APIS (mostly shared with DRI2). This interface will work with the DRI3 loader, and should also work with GBM and other loaders so that drivers need not be customized for each new loader interface, as long as they provide this image interface. v2: Fix build of i915 and i965 together (by anholt) Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* dri/i915,dri/i965: Use driGLFormatToImageFormat and driImageFormatToGLFormatKeith Packard2013-11-071-49/+4
| | | | | | | | Remove private versions of these functions Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* dri/intel: Add explicit size parameter to intel_region_alloc_for_fdKeith Packard2013-11-071-2/+2
| | | | | | | | | Instead of assuming that the size will be height * pitch, have the caller pass in the size explicitly. Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* i915: Wire up initial support for DRI_RENDERER_QUERY extensionIan Romanick2013-11-071-0/+81
| | | | | | | | v2: Use sysconf instead of sysinfo for improved portability. Suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/dri: Move context flag validation down into the driversIan Romanick2013-11-071-0/+5
| | | | | | | | | | | | | | | Soon some drivers will support a different set of flags than other drivers. If some flags have to be filtered in the driver, we might as well filter all of them in the driver. The changes in nouveau use tabs because nouveau seems to have it's own indentation rules. v2: Fix some rebase failures noticed by Ken (returning the wrong types, etc.). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/dri: Add basic plumbing for GLX_ARB_robustness reset notification strategyIan Romanick2013-11-071-0/+6
| | | | | | | | | | | No drivers advertise the DRI2 extension yet, so no driver should ever see a value other than false for notify_reset. The changes in nouveau use tabs because nouveau seems to have it's own indentation rules. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Build the driver into the shared mesa_dri_drivers.so.Eric Anholt2013-10-241-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | i915 has symbols for formerly-shared code that conflict with i965, so we define them away using gen-symbol-redefs.py. Options considered: - This option. Downsides: The symbols in profiling and debugging don't match the source. The symbol list may change in the future and we won't notice without manually running the tool again. - Use objcopy --localize-hidden to automatically demote our symbols to locals. This didn't work on i965 due to c++ weak symbols (which can't be localized), but could work on i915. We could do it on i915 only, but it does produce libtool warnings at link time due to libtool not knowing if the resulting .o file is safe to link (stupid libtool). Plus you end up with different symbols of the same name, which is confusing for debugging too. On the other hand, no future symbol conflicts long term. - Write our own libelf tool that handles c++ weak symbols like we want and apply it to all drivers. All the downsides of above, but applies uniformly across drivers. - Edit the files to just rename all the i915 or i965 symbols that conflict. There are on the order of 100 that have a prefix we used to share, so it would take a bit of typing. Fewest downsides, but still can have conflicts long term. Ultimately, this is the least invasive change at the moment, and we can see if the "more symbol conflicts appear later" thing is a real concern or not. Note that the ability to compile a version of i915 without INTEL_DEBUG env support is dropped. It's too useful. v2: drop dridir now that it's unused. v3: Consistently put spaces around += in the updated Makefile.am block. v4: Set a global driverAPI variable so loaders don't have to update to createNewScreen2() (though they may want to for thread safety). Reviewed-by: Matt Turner <[email protected]> (v2) Reviewed-by: Emil Velikov <[email protected]>
* dri: Move driver config options to dri driver extensions.Eric Anholt2013-10-241-4/+9
| | | | | | | | | This way they aren't all sitting in the global namespace (with the same name per driver). Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri: Move API version validation into dri/common.Eric Anholt2013-10-101-27/+9
| | | | | | | | | | | | | | | | | i965, i915, radeon, r200, swrast, and nouveau were mostly trying to do the same logic, except where they failed to. Notably, swrast had code that appeared to try to enable GLES1/2 but forgot to set api_mask (thus preventing any gles context from being created), and the non-intel drivers didn't support MESA_GL_VERSION_OVERRIDE. nouveau still relies on _mesa_compute_version(), because I don't know what its limits actually are, and gallium drivers don't declare limits up front at all. I think I've heard talk about doing so, though. v2: Compat max version should be 30 (noted by Ken) Drop r100's custom max version check, too (noted by Emil Velikov) Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove some remaining FEATURE_* detritus.Eric Anholt2013-09-261-8/+0
| | | | | Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium, intel: Implements new __DRI_IMAGE_USE_LINEAR and PIPE_BIND_LINEAR ↵Axel Davy2013-09-061-0/+3
| | | | | | flags to enforce no tiling. Signed-off-by: Axel Davy <[email protected]>
* dri: Choose a decent global driNConfigOptions.Eric Anholt2013-08-171-4/+1
| | | | | | | | | | Previously, we were asserting that each driver specified an NConfigOptions exactly equal to the number of options they supplied, leading to frequent bugs when people would forget to adjust the value when adjusting driver options. Instead, just overallocate the table by a bit and leave sanity checking to the assert in findOption(). Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove unused allow_large_textures driconf from classic drivers.Eric Anholt2013-06-281-2/+1
| | | | | | This option hasn't been used since the introduction of DRI2. Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Drop 965+ GL version setup.Eric Anholt2013-06-281-22/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Drop chipset detection code for 965+ chipsets.Eric Anholt2013-06-281-9/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Drop all has_llc code.Eric Anholt2013-06-281-6/+0
| | | | | | i915 never has llc. Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Remove most of the code under gen >= 4 checks.Eric Anholt2013-06-281-21/+4
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Remove separate stencil code.Eric Anholt2013-06-281-48/+7
| | | | | | This was formerly-shared code for supporting gen5+. Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Remove the I915 macro from the formerly shared code.Eric Anholt2013-06-281-20/+0
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Remove all the MSAA support code.Eric Anholt2013-06-281-64/+6
| | | | | | This hardware doesn't have MSAA support, so this code is all a waste for it. Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Remove all the HiZ code from i915.Eric Anholt2013-06-281-5/+1
| | | | | | v2: Remove extra struct forward declaration (change by Ken) Reviewed-by: Kenneth Graunke <[email protected]>
* i915: Fork the shared code from i965.Eric Anholt2013-06-261-1/+1409
| | | | | | | | | | | | | Of this 15000 lines of code in intel/, we've identified 4000 lines that are trivially unnecessary for i915, and another 1000 that are pointless for i965, and expect to find more as time goes on. Split the i915 driver off, so that we can continue active development on i965 without worrying about breaking i915. Acked-by: Kenneth Graunke <[email protected]> Acked-by: Chad Versace <[email protected]> Acked-by: Adam Jackson <[email protected]> (and I hear second hand that idr is OK with it, too)
* [intel] Move over files that will be shared with 965-fbo work.Eric Anholt2007-11-091-945/+1
|
* Refactor and fix core vblank supportJesse Barnes2007-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Consolidate support for synchronizing to and retrieving vblank counters. Also fix the core vblank code to return monotonic MSC counters, which are required by some GLX extensions. Adding support for multiple pipes to a low level driver is fairly easy, the Intel 965 driver provides simple example code (see intel_buffers.c:intelWindowMoved()). The new code bumps the media stream counter extension version to 2 and adds a new getDrawableMSC callback. This callback takes a drawablePrivate pointer, which is used to calculate the MSC value seen by clients based on the actual vblank counter(s) returned from the kernel. The new drawable private fields are as follows: - vblSeq - used for tracking vblank counts for buffer swapping - vblFlags - flags (e.g. current pipe), updated by low level driver - msc_base - MSC counter from the last time the current pipe changed - vblank_base - kernel DRM vblank counter from the last time the pipe changed Using the above variables, the core vblank code (in vblank.c) can calculate a monotonic MSC value. The low level DRI drivers are responsible for updating the current pipe (by setting VBLANK_FLAG_SECONDARY for example in vblFlags) along with msc_base and vblank_base whenever the pipe associated with a given drawable changes (again, see intelWindowMoved for an example of this). Drivers should fill in the GetDrawableMSC DriverAPIRec field to point to driDrawableGetMSC32 and add code for pipe switching as outlined above to fully support the new scheme.
* i915: Make sure extensions that require TTM actually work.Michel Dänzer2007-10-161-0/+2
|
* i915: Re-enable __DRItexOffsetExtension.Michel Dänzer2007-10-161-0/+6
| | | | This seems to have got lost somehow during the recent DRI interface changes.
* Merge branch 'dri2'Kristian Høgsberg2007-10-121-66/+43
|\ | | | | | | | | | | Conflicts: src/mesa/drivers/dri/i915/intel_screen.c
| * Drop no longer implemented MESA allocate extension from i915.Kristian Høgsberg2007-10-111-8/+0
| |
| * Add a version field to __DRIextension.Kristian Høgsberg2007-10-111-1/+1
| |
| * Add a DRI_ReadDrawable marker extension to signal read drawable capability.Kristian Høgsberg2007-10-111-8/+1
| |
| * Move media stream counter entry points to new extension.Kristian Høgsberg2007-10-111-1/+1
| |
| * Move GLX_MESA_swap_frame_usage DRI entry points to the new mechanism.Kristian Høgsberg2007-10-111-1/+1
| |
| * Move GLX_MESA_allocate_memory related functions to new extension mechanism.Kristian Høgsberg2007-10-111-0/+8
| |
| * Move swap_interval to new extension mechanism.Kristian Høgsberg2007-10-101-2/+1
| |
| * Move the copySubBuffer extension over to the new mechanism.Kristian Høgsberg2007-10-101-2/+8
| |
| * Pull createNewScreen entry point into dri_util.c.Kristian Høgsberg2007-10-101-46/+27
| | | | | | | | | | | | | | | | This pulls the top level createNewScreen entry point out of the drivers and rewrites __driUtilCreateNewScreen in dri_util.c to be the new entry point. The change moves more logic into the common/ layer and changes the createNewScreen entry point to only be defined in one place.
| * Replace open-coded major, minor, and patch version fields with __DRIversionRec.Kristian Høgsberg2007-10-101-5/+5
| |
| * Remove screenConfigs from __DRIscreen.Kristian Høgsberg2007-10-101-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | The screenConfigs field of __DRIscreen points back to the containing __GLXscreenConfigs struct. This is a serious abstraction violation; it assumes that the loader is libGL and that there *is* a __GLXscreenConfigs type in the loader. Using the containerOf macro, we can get from the __DRIscreen pointer to the containing __GLXscreenConfigs struct, at a place in the stack where the above is a valid assumption. Besides, the __DRI* structs shouldn't hold state other than the private pointer.
| * Drop __DRInativeDisplay and pass in __DRIscreen pointers instead.Kristian Høgsberg2007-10-101-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Many DRI entry points took a __DRInativeDisplay pointer and a screen index as arguments. The only use for the native display pointer was to pass it back to the loader when looking up the __DRIscreen for the given screen index. Instead, let's just pass in the __DRIscreen pointer directly, which let's drop the __DRInativeDisplay type and the getScreen function. The assumption is now that the loader will be able to retrieve context from the __DRIscreen pointer when necessary.
* | i915: only enable TTM path if drm minor is > 11 for superioctlDave Airlie2007-10-121-0/+1
| |
* | i915: workout max relocs from batch buffer sizeDave Airlie2007-10-091-3/+4
| |
* | i915: add superioctl support to the ttm codepaths.Dave Airlie2007-10-041-0/+2
| | | | | | | | | | gears now runs for about 10-15 seconds with some artifacts before falling over.