aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau/nouveau_screen.c
Commit message (Collapse)AuthorAgeFilesLines
* nouveau: enable use of new kernel interfacesBen Skeggs2015-12-221-2/+0
| | | | | | | Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Samuel Pitoiset <[email protected]>
* nouveau: remove use of deprecated nouveau_device_wrap()Ben Skeggs2015-12-221-1/+17
| | | | | | | | | | | | | | Switching to the newer libdrm entry-points tells libdrm that it's OK to make use of newer kernel interfaces. We want to be able to isolate any bugs to either the interfaces changes, or the use of NVIF itself. As such, this commit has a slight hack which forces libdrm to continue using the older kernel interfaces. Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Tested-by: Samuel Pitoiset <[email protected]>
* nouveau: include stdio.h where neededBrian Paul2015-03-051-0/+1
| | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* nouveau: replace Elements() with ARRAY_SIZE()Brian Paul2015-03-021-4/+4
| | | | Acked-by: Ilia Mirkin <[email protected]>
* nouveau: avoid leaking screen on initialization failIlia Mirkin2014-09-131-2/+5
| | | | | | Reported by Coverity Signed-off-by: Ilia Mirkin <[email protected]>
* dri/nouveau: add GLX_MESA_query_renderer supportEmil Velikov2014-08-151-11/+71
| | | | | | | | - Create nouveau_{vendor,get_renderer}_string helpers. - Set correct max_gl*version. - Query the device PCIID via libdrm_nouveau/nouveau_getparam. Signed-off-by: Emil Velikov <[email protected]>
* drivers/dri: cleanup dri extension instantiationEmil Velikov2014-04-281-3/+5
| | | | | | | | | | | | | | | | | Uniformly use the typecasted extension name, constify extension instances and use designated initialisers. Set the implemented version of the extension, over the one defined in dri_infertace.h. Patch covers the following extensions: __DRItexBufferExtension __DRIimageExtension __DRIrobustnessExtension __DRI2rendererQueryExtension __DRIdri2LoaderExtension Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* drivers/dri: explicitly set __DRI2flushExtension membersEmil Velikov2014-02-231-3/+4
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ian Romanick <[email protected]>y
* mesa: Change many Type P MESA_FORMATs to meet naming specMark Mueller2014-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conversion of Type P formats as follows (w/related comment fixes): s/MESA_FORMAT_RGB565\b/MESA_FORMAT_B5G6R5_UNORM/g s/MESA_FORMAT_RGB565_REV\b/MESA_FORMAT_R5G6B5_UNORM/g s/MESA_FORMAT_ARGB4444\b/MESA_FORMAT_B4G4R4A4_UNORM/g s/MESA_FORMAT_ARGB4444_REV\b/MESA_FORMAT_A4R4G4B4_UNORM/g s/MESA_FORMAT_RGBA5551\b/MESA_FORMAT_A1B5G5R5_UNORM/g s/MESA_FORMAT_XBGR8888_SNORM\b/MESA_FORMAT_R8G8B8X8_SNORM/g s/MESA_FORMAT_XBGR8888_SRGB\b/MESA_FORMAT_R8G8B8X8_SRGB/g s/MESA_FORMAT_ARGB1555\b/MESA_FORMAT_B5G5R5A1_UNORM/g s/MESA_FORMAT_ARGB1555_REV\b/MESA_FORMAT_A1R5G5B5_UNORM/g s/MESA_FORMAT_AL44\b/MESA_FORMAT_L4A4_UNORM/g s/MESA_FORMAT_RGB332\b/MESA_FORMAT_B2G3R3_UNORM/g s/MESA_FORMAT_ARGB2101010\b/MESA_FORMAT_B10G10R10A2_UNORM/g s/MESA_FORMAT_Z24_S8\b/MESA_FORMAT_S8_UINT_Z24_UNORM/g s/MESA_FORMAT_S8_Z24\b/MESA_FORMAT_Z24_UNORM_S8_UINT/g s/MESA_FORMAT_X8_Z24\b/MESA_FORMAT_Z24_UNORM_X8_UINT/g s/MESA_FORMAT_Z24_X8\b/MESA_FORMAT_X8Z24_UNORM/g s/MESA_FORMAT_RGB9_E5_FLOAT\b/MESA_FORMAT_R9G9B9E5_FLOAT/g s/MESA_FORMAT_R11_G11_B10_FLOAT\b/MESA_FORMAT_R11G11B10_FLOAT/g s/MESA_FORMAT_Z32_FLOAT_X24S8\b/MESA_FORMAT_Z32_FLOAT_S8X24_UINT/g s/MESA_FORMAT_ABGR2101010_UINT\b/MESA_FORMAT_R10G10B10A2_UINT/g s/MESA_FORMAT_XRGB4444_UNORM\b/MESA_FORMAT_B4G4R4X4_UNORM/g s/MESA_FORMAT_XRGB1555_UNORM\b/MESA_FORMAT_B5G5R5X1_UNORM/g s/MESA_FORMAT_XRGB2101010_UNORM\b/MESA_FORMAT_B10G10R10X2_UNORM/g s/MESA_FORMAT_AL88\b/MESA_FORMAT_L8A8_UNORM/g s/MESA_FORMAT_AL88_REV\b/MESA_FORMAT_A8L8_UNORM/g s/MESA_FORMAT_AL1616\b/MESA_FORMAT_L16A16_UNORM/g s/MESA_FORMAT_AL1616_REV\b/MESA_FORMAT_A16L16_UNORM/g s/MESA_FORMAT_RG88\b/MESA_FORMAT_G8R8_UNORM/g s/MESA_FORMAT_GR88\b/MESA_FORMAT_R8G8_UNORM/g s/MESA_FORMAT_GR1616\b/MESA_FORMAT_R16G16_UNORM/g s/MESA_FORMAT_RG1616\b/MESA_FORMAT_G16R16_UNORM/g s/MESA_FORMAT_SRGBA8\b/MESA_FORMAT_A8B8G8R8_SRGB/g s/MESA_FORMAT_SARGB8\b/MESA_FORMAT_B8G8R8A8_SRGB/g s/MESA_FORMAT_SLA8\b/MESA_FORMAT_L8A8_SRGB/g Conflicts: src/mesa/drivers/dri/i965/brw_surface_formats.c src/mesa/main/format_pack.c src/mesa/main/format_unpack.c src/mesa/main/formats.c src/mesa/main/texformat.c src/mesa/main/texstore.c
* mesa: Rename 4 color component unsigned byte MESA_FORMATsMark Mueller2014-01-271-2/+2
| | | | | | | | | | | | | 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-1/+1
| | | | s/\bgl_format\b/mesa_format/g. Use better name for Mesa Formats enum
* dri/nouveau: Fix nouveau_init_screen2 breakage.Francisco Jerez2013-11-041-16/+15
| | | | | | | Fix incorrect init ordering in nouveau_init_screen2 caused by 083f66fdd6451648fe355b64b02b29a6a4389f0d. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71172
* nouveau: Build the driver into the shared mesa_dri_drivers.so.Eric Anholt2013-10-241-2/+15
| | | | | | | | | | | 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). v5: Fix missed public symbol in nouveau. (caught by Emil) Reviewed-by: Matt Turner <[email protected]> (v2) Reviewed-by: Emil Velikov <[email protected]>
* dri: Move API version validation into dri/common.Eric Anholt2013-10-101-0/+12
| | | | | | | | | | | | | | | | | 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]>
* glx/dri2: add and use new driver hook flush_with_flagsMarek Olšák2012-12-021-1/+1
|
* dri: Convert driCreateConfigs to use a gl_format enumIan Romanick2012-10-291-10/+6
| | | | | | | | | | | This is instead of the pair of GLenums for format and type that were previously used. This is necessary for the Intel drivers to expose sRGB framebuffer formats. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa: s/FREE/free/Brian Paul2012-09-011-1/+1
| | | | | | | v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* dri: Simplify use of driConcatConfigsChad Versace2012-08-071-2/+1
| | | | | | | | | | | | If either argument to driConcatConfigs(a, b) is null or the empty list, then simply return the other argument as the resultant list. All callers were accomplishing that same behavior anyway. And each caller accopmplished it with the same pattern. So this patch moves that external pattern into the function. Reviewed-by: <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* nouveau: use _mesa_is_winsys/user_fbo() helpersBrian Paul2012-05-011-0/+1
| | | | Reviewed-by: Eric Anholt <[email protected]>
* nouveau/vieux: switch to libdrm_nouveau-2.0Ben Skeggs2012-04-141-5/+2
|
* mesa/drivers: use new swrast renderbuffer functionsBrian Paul2011-12-081-3/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* dri: unify __DRIscreenRecGeorge Sapountzis2011-11-041-3/+3
| | | | | Also drop DriverAPI field, this is a static symbol and I don't see why it should be accessed through __DRIscreenRec
* dri: unify __DriverAPIRecGeorge Sapountzis2011-11-041-1/+1
| | | | I dropped the comments because they don't add much.
* Rename GLvisual and __GLcontextModes to struct gl_configKristian Høgsberg2010-10-131-1/+1
|
* dri/nouveau: Don't request a fake front unnecessarily.Francisco Jerez2010-09-161-1/+1
|
* DRI2: add config query extensionJesse Barnes2010-04-221-0/+1
| | | | | Add a new DRI2 configuration query extension. Allows for DRI2 client code to query for common DRI2 configuration options.
* dri/nouveau: Implement EXT_texture_from_pixmap.Francisco Jerez2010-02-251-0/+8
|
* dri/nouveau: Some multithreaded rendering fixes.Francisco Jerez2010-02-171-37/+5
|
* dri/nouveau: Use event driven buffer validation.Francisco Jerez2010-02-161-0/+12
|
* dri: Allow selective generation of accum. buffer configsIan Romanick2010-02-101-1/+2
| | | | | | | | | | | Modify the interface to driCreateConfigs allowing drivers to not expose configs with an accumuation buffer. All of the drivers calling function have been updated to pass true for the accumulation selector. This maintains the current behavior. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Corbin Simpson <[email protected]>
* Import a classic DRI driver for nv0x-nv2x.Francisco Jerez2010-02-041-0/+269
|
* nouveau: say goodbye to the old DRI driver...Stephane Marchesin2008-07-141-325/+0
|
* DRI interface changes and DRI2 direct rendering support.Kristian Høgsberg2008-03-311-75/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add DRI2 direct rendering support to libGL and add DRI2 client side protocol code. Extend the GLX 1.3 create drawable functions in glx_pbuffer.c to call into the DRI driver when possible. Introduce __DRIconfig, opaque struct that represents a DRI driver configuration. Get's rid of the open coded __GLcontextModes in the DRI driver interface and the context modes create and destroy functions that the loader was requires to provide. glcore.h is no longer part of the DRI driver interface. The DRI config is GL binding agnostic, that is, not specific to GLX, EGL or other bindings. The core API is now also an extension, and the driver exports a list of extensions as the symbol __driDriverExtensions, which the loader must dlsym() for. The list of extension will always include the DRI core extension, which allows creating and manipulating DRI screens, drawables and contexts. The DRI legacy extension, when available, provides alternative entry points for creating the DRI objects that work with the XF86DRI infrastructure. Change DRI2 client code to not use drm drawables or contexts. We never used drm_drawable_t's and the only use for drm_context_t was as a unique identifier when taking the lock. We now just allocate a unique lock ID out of the DRILock sarea block. Once we get rid of the lock entirely, we can drop this hack. Change the interface between dri_util.c and the drivers, so that the drivers now export the DriverAPI struct as driDriverAPI instead of the InitScreen entry point. This lets us avoid dlsym()'ing for the DRI2 init screen function to see if DRI2 is supported by the driver.
* nouveau: compilation fixesPatrice Mandin2008-03-021-2/+2
|
* Use __DRIextension mechanism providing loader functionality to the driver.Kristian Høgsberg2008-02-291-5/+7
| | | | | | | Instead of passing in a fixed struct, the loader now passes in a list of __DRIextension structs, to advertise the functionality it can provide to the driver. Each extension is individually versioned and can be extended or phased out as the interface develops.
* Remove GetMSC DriverAPI function.Kristian Høgsberg2008-02-251-1/+0
| | | | | | | | | | | The DriverAPI is internal to the DRI drivers and GetDrawableMSC obsoletes GetMSC. Also, since the DRI driver interface has not yet been released, just drop the getMSC function from the DRI interface instead using the ABI preserving version mechanism. Finally, using void pointer privates in the DRI interface is not allowed, always pass the actual types around (__DRIdrawable in this case) to enhance type safety and readability of the code.
* nouveau: ddx versioning changedBen Skeggs2008-02-121-1/+6
|
* 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.
* Pull createNewScreen entry point into dri_util.c.Kristian Høgsberg2007-10-101-58/+38
| | | | | | | | 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.
* Drop __DRInativeDisplay and pass in __DRIscreen pointers instead.Kristian Høgsberg2007-10-101-11/+11
| | | | | | | | | | | | | 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.
* nouveau: Always render offscreen, emulate front buffer rendering.Ben Skeggs2007-08-151-19/+8
|
* nouveau: Lets only do private buffers.Ben Skeggs2007-08-151-29/+23
|
* nouveau: update to DRM API patchlevel 10Carlos Martín Nieto2007-08-071-1/+1
| | | | Finally let DRI build for nouveau.
* nouveau: match drm 0.0.9 interfaceBen Skeggs2007-07-121-1/+1
|
* bumped nouveau DRM interface version numberArthur Huillet2007-07-111-1/+1
|
* nouveau: match drm changes (0.0.7)Ben Skeggs2007-06-291-1/+1
|
* nouveau: match drm version bumppre-merge-glsl-compiler-1Ben Skeggs2007-03-261-1/+1
|
* nouveau: update for drm interface changes (0.0.5)Ben Skeggs2007-03-211-1/+1
|
* Fix/improve framebuffer object reference counting.Brian2007-03-061-1/+1
| | | | | | | Use _mesa_reference_framebuffer() and _mesa_unreference_framebuffer() functions to be sure reference counting is done correctly. Additional assertions are done too. Note _mesa_dereference_framebuffer() renamed to "unreference" as that's more accurate.
* nouveau: drm interface changesBen Skeggs2007-02-281-2/+4
|