aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau/nouveau_context.c
Commit message (Collapse)AuthorAgeFilesLines
* nouveau: include stdio.h where neededBrian Paul2015-03-051-0/+1
| | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* nouveau: 3d textures are unsupported, limit 3d levels to 1Ilia Mirkin2014-10-141-0/+3
| | | | | | | | | | Ideally there would be a swrast fallback, but the driver isn't ready for that. This should avoid crashes if someone tries to use 3d textures though. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Cc: [email protected]
* nouveau: check for mesa context init failureIlia Mirkin2014-09-131-2/+2
| | | | | | Reported by Coverity Signed-off-by: Ilia Mirkin <[email protected]>
* dri/nouveau: Pass the API into _mesa_initialize_contextEmil Velikov2014-02-111-3/+4
| | | | | | | | | | | Currently we create a OPENGL_COMPAT context regardless of what was requested by the program. Correct that by retaining the program's request and passing it into _mesa_initialize_context. Based on a similar commit for radeon/r200 by Ian Romanick. Cc: "9.1 9.2 10.0" <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* mesa: GL_EXT_framebuffer_blit is not optionalIan Romanick2014-01-271-1/+0
| | | | | | | | | Every driver supports it. All current and future Gallium drivers always support it, and all existing classic drivers support it. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nouveau: add framebuffer validation callbackIlia Mirkin2014-01-151-0/+1
| | | | | | | | | | Fixes assertions when trying to attach textures to fbs with formats not supported by the render engines. See https://bugs.freedesktop.org/show_bug.cgi?id=73459 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* mesa: GL_EXT_packed_depth_stencil is not optionalIan Romanick2013-12-201-1/+0
| | | | | | | | Every driver supports it. All current and future Gallium drivers always support it, and all existing classic drivers support it. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* dri_util: Don't assume __DRIcontext->driverPrivate is a gl_contextKristian Høgsberg2013-12-131-0/+2
| | | | | | | | | | | | | | | | | 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]>
* mesa/dri: Move context flag validation down into the driversIan Romanick2013-11-071-3/+4
| | | | | | | | | | | | | | | 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]>
* dri: Move API version validation into dri/common.Eric Anholt2013-10-101-23/+0
| | | | | | | | | | | | | | | | | 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: GL_NV_blend_square is not optionalIan Romanick2013-06-281-1/+0
| | | | | | | | | Every driver left in Mesa enables this extension all the time. There's no reason to let it be optional. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: GL_EXT_fog_coord is not optionalIan Romanick2013-06-281-1/+0
| | | | | | | | | Every driver left in Mesa enables this extension all the time. There's no reason to let it be optional. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: GL_EXT_secondary_color is not optionalIan Romanick2013-06-281-1/+0
| | | | | | | | | Every driver left in Mesa enables this extension all the time. There's no reason to let it be optional. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: GL_EXT_framebuffer_object is not optionalIan Romanick2013-06-281-1/+0
| | | | | | | | | Every driver left in Mesa enables this extension all the time. There's no reason to let it be optional. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Make the drivers call a non-code-generated dispatch table setup.Eric Anholt2013-01-211-1/+1
| | | | | | | I want to drive the Save dispatch table setup from this same function. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* drivers: compute version and then initialize exec tableJordan Justen2012-12-161-0/+6
| | | | | | | | This change forces the context version to be computed before initilizing the exec dispatch tables. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Rename API_OPENGL to API_OPENGL_COMPAT.Paul Berry2012-11-291-2/+2
| | | | | | | | | | This should help avoid confusion now that we're using the gl_api enum to distinguishing between core and compatibility API's. The corresponding enum value for core API's is API_OPENGL_CORE. Acked-by: Eric Anholt <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* mesa: remove the driverCtx parameter to _mesa_create/initialize_context()Brian Paul2012-10-051-1/+1
| | | | No longer used.
* dri: Pass API_OPENGL_CORE through to the driversIan Romanick2012-08-131-1/+23
| | | | | | | | | | | This forces the drivers to do at least some validation of context API and version before creating the context. In r100 and r200 drivers, this means that they don't do any post-hoc validation. v2: Actually reject compatibility profile 3.2+ contexts. Thanks Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Replace VersionMajor/VersionMinor with a Version field.Eric Anholt2012-08-071-3/+1
| | | | | | | | | | | As we get into supporting GL 3.x core, we come across more and more features of the API that depend on the version number as opposed to just the extension list. This will let us more sanely do version checks than "(VersionMajor == 3 && VersionMinor >= 2) || VersionMajor >= 4". v2: Fix a bad <= 30 check. Reviewed-by: Kenneth Graunke <[email protected]>
* nouveau/vieux: finish != flush, how about we do that..Ben Skeggs2012-05-121-0/+8
| | | | Signed-off-by: Ben Skeggs <[email protected]>
* nouveau: use _mesa_is_winsys/user_fbo() helpersBrian Paul2012-05-011-2/+3
| | | | Reviewed-by: Eric Anholt <[email protected]>
* nouveau/vieux: switch to libdrm_nouveau-2.0Ben Skeggs2012-04-141-24/+50
|
* dri2: Add plumbing to get context version requirements and flags to driversIan Romanick2012-01-021-1/+23
| | | | | | This adds support for DRI_DRI2 version 3 to all of the DRI2 drivers. Signed-off-by: Ian Romanick <[email protected]>
* dri: unify __DRIscreenRecGeorge Sapountzis2011-11-041-1/+1
| | | | | Also drop DriverAPI field, this is a static symbol and I don't see why it should be accessed through __DRIscreenRec
* dri: Remove unnecessary timestamp pointer indirectionKristian Høgsberg2011-11-021-4/+4
|
* mesa: Remove ARB_texture_mirrored_repeat extension enable flagIan Romanick2011-09-291-1/+0
| | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. This extension was previously not supported on mach64, mga, and savage (Savage3D and other pre-Savage4). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_blend_subtract extension enable flagIan Romanick2011-09-291-1/+0
| | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. This extension was previously not supported on i810, mach64, mga, savage, sis, and tdfx (Voodoo Banshee and Voodoo3). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_stencil_wrap extension enable flagIan Romanick2011-09-291-1/+0
| | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. This extension was previously not supported on mach64. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_texture_lod_bias extension enable flagIan Romanick2011-09-291-1/+0
| | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. This extension was previously not supported on mach64, mga, or r128. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_texture_env_combine extension enable flagIan Romanick2011-09-291-1/+0
| | | | | | | | | | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. The existing support is already partially broken in Mesa (e.g., querying GL_TEXTURE_ENV_MODE in OpenGL ES 2.x). This patch does not change the situation in any way. It looks like the only hardware supported by Mesa that cannot do ARB_texture_env_combine is pre-NV10 NVIDA chips. It appears that these chips cannot do the GL_SUBTRACT mode. Based on looking at older copies of nvOpenGLspecs.pdf found on the net, NVIDIA never supported ARB_texture_env_combine on those chips either. This extension was previously not supported on mach64, mga (G200), r128, savage, sis, and tdfx (Voodoo Banshee and Voodoo3). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_texture_env_add extension enable flagIan Romanick2011-09-291-1/+0
| | | | | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. The existing support is already partially broken in Mesa (e.g., querying GL_TEXTURE_ENV_MODE in OpenGL ES 2.x). This patch does not change the situation in any way. This extension was previously not supported on mach64, mga (G200), savage (Savage3D and other pre-Savage4), sis, and tdfx (Voodoo Banshee). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove ARB_multitexture extension enable flagIan Romanick2011-09-291-1/+0
| | | | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. The existing support is already partially broken in Mesa (e.g., querying GL_CLIENT_ACTIVE_TEXTURE in OpenGL ES 2.x). This patch does not change the situation in any way. This extension was previously not supported on i810, mga (G200), or tdfx (Voodoo Banshee). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nouveau: Enable extensions by just setting the flagsIan Romanick2011-09-091-25/+18
| | | | | | | | | | | | | | | | | Core Mesa already does the dispatch offset remapping for every function that could possibly ever be supported. There's no need to continue using that cruft in the driver. Since the call to _mesa_enable_imaging_extensions (via driInitExtensions) is removed, EXT_blend_color, EXT_blend_minmax, and EXT_blend_subtract are explicitly added to the list. EXT_blend_logic_op is removed from the list of extensions because blend factors and separate blend equations are not handled correctly. Cc: Ben Skeggs <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Cc: Viktor Novotný <[email protected]>
* dri/nouveau: fix gnome-shell segfaultBen Skeggs2011-06-061-1/+1
| | | | Signed-off-by: Ben Skeggs <[email protected]>
* mesa: remove _mesa_initialize_context_for_api()Brian Paul2011-02-081-1/+2
| | | | Just add the gl_api parameter to _mesa_initialize_context().
* dri/nouveau: Fix typo.Francisco Jerez2010-11-151-1/+1
|
* dri/nouveau: Re-emit the BO state when coming back from a software fallback.Francisco Jerez2010-10-311-2/+4
|
* dri/nouveau: Split out the scratch helpers to a separate file.Francisco Jerez2010-10-311-0/+2
|
* dri/nouveau: Call _mesa_update_state() after framebuffer invalidation.Francisco Jerez2010-10-301-1/+2
| | | | | Previously nouveau_state_emit() was being called directly, sometimes that doesn't work because it doesn't update the derived GL context.
* dri/nouveau: Force a "slow" Z clear if we're getting a new depth buffer.Francisco Jerez2010-10-221-0/+12
|
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-11/+11
|
* Rename GLvisual and __GLcontextModes to struct gl_configKristian Høgsberg2010-10-131-2/+2
|
* nouveau: Get larger push buffers.Francisco Jerez2010-10-121-1/+1
| | | | | Useful to amortize the command submission/reloc overhead (e.g. etracer goes from 72 to 109 FPS on nv4b).
* dri/nouveau: Minor cleanup.Francisco Jerez2010-10-101-2/+1
|
* dri/nouveau: Remove unnecessary flush.Francisco Jerez2010-09-301-3/+1
|
* mesa: Force GL_SGIS_generate_mipmap to always be enabledIan Romanick2010-09-271-1/+0
| | | | As per discussions at XDS.
* dri/nouveau: Cleanup more references to old FBOs and VBOs.Francisco Jerez2010-09-211-4/+3
|
* dri/nouveau: Cleanup references to the old FBOs on glMakeCurrent().Francisco Jerez2010-09-161-16/+8
|