summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon/radeon_screen.c
AgeCommit message (Collapse)AuthorFilesLines
2014-04-28dri/radeon: use a const __DRIextension arrayEmil Velikov1-15/+14
Rather than keeping a separate and unused copy of the screen extensions within the radeon screen, use a constant array that can be used directly with __DRIscreen. [Kristian Høgsberg] The copy in the radeon screen isn't unused, that's where the array is built and stored, the dri screen just points to that. The pattern here was used for cases where the extensions exported by a dri driver could vary at runtime, for example depending on chipset. In this case, it's known at compile time, so it makes sense to use a static const array instead. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-04-28drivers/dri: cleanup dri extension instantiationEmil Velikov1-13/+18
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 <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-02-23drivers/dri: explicitly set __DRI2flushExtension membersEmil Velikov1-3/+4
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>y
2014-02-09mesa: Fix MESA_FORMAT_Z24_UNORM_S8_UINT vs. X8_UINT mix-up.Kenneth Graunke1-2/+2
In commit eeed49f5f290793870c60b5b635b977a732a1eb4, Mark accidentally renamed MESA_FORMAT_S8_Z24 to MESA_FORMAT_Z24_UNORM_X8_UINT and MESA_FORMAT_X8_Z24 to MESA_FORMAT_Z24_UNORM_S8_UINT, reversing their sense. The commit message was correct, but what sed commands actually got run didn't match that. This patch swaps the two enum names, reversing them. This should undo the damage, but might break things if people have manually fixed a few instances in the meantime... Mark's commit also failed to mention renames: s/MESA_FORMAT_ARGB2101010_UINT\b/MESA_FORMAT_B10G10R10A2_UINT/g s/MESA_FORMAT_ABGR2101010\b/MESA_FORMAT_R10G10B10A2_UNORM/g but those seem okay. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-01-27mesa: Change many Type P MESA_FORMATs to meet naming specMark Mueller1-6/+6
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
2014-01-27mesa: Change many Type A MESA_FORMATs to meet naming standardMark Mueller1-1/+1
Update comments. Conversion of the following Type A formats: s/MESA_FORMAT_RGB888\b/MESA_FORMAT_BGR_UNORM8/g s/MESA_FORMAT_BGR888\b/MESA_FORMAT_RGB_UNORM8/g s/MESA_FORMAT_A8\b/MESA_FORMAT_A_UNORM8/g s/MESA_FORMAT_A16\b/MESA_FORMAT_A_UNORM16/g s/MESA_FORMAT_L8\b/MESA_FORMAT_L_UNORM8/g s/MESA_FORMAT_L16\b/MESA_FORMAT_L_UNORM16/g s/MESA_FORMAT_I8\b/MESA_FORMAT_I_UNORM8/g s/MESA_FORMAT_I16\b/MESA_FORMAT_I_UNORM16/g s/MESA_FORMAT_R8\b/MESA_FORMAT_R_UNORM8/g s/MESA_FORMAT_R16\b/MESA_FORMAT_R_UNORM16/g s/MESA_FORMAT_Z16\b/MESA_FORMAT_Z_UNORM16/g s/MESA_FORMAT_Z32\b/MESA_FORMAT_Z_UNORM32/g s/MESA_FORMAT_S8\b/MESA_FORMAT_S_UINT8/g s/MESA_FORMAT_SRGB8\b/MESA_FORMAT_BGR_SRGB8/g s/MESA_FORMAT_RGBA_16\b/MESA_FORMAT_RGBA_UNORM16/g s/MESA_FORMAT_SL8\b/MESA_FORMAT_L_SRGB8/g s/MESA_FORMAT_Z32_FLOAT\b/MESA_FORMAT_Z_FLOAT32/g s/MESA_FORMAT_XBGR16161616_UNORM\b/MESA_FORMAT_RGBX_UNORM16/g s/MESA_FORMAT_XBGR16161616_SNORM\b/MESA_FORMAT_RGBX_SNORM16/g s/MESA_FORMAT_XBGR16161616_FLOAT\b/MESA_FORMAT_RGBX_FLOAT16/g s/MESA_FORMAT_XBGR16161616_UINT\b/MESA_FORMAT_RGBX_UINT16/g s/MESA_FORMAT_XBGR16161616_SINT\b/MESA_FORMAT_RGBX_SINT16/g s/MESA_FORMAT_XBGR32323232_FLOAT\b/MESA_FORMAT_RGBX_FLOAT32/g s/MESA_FORMAT_XBGR32323232_UINT\b/MESA_FORMAT_RGBX_UINT32/g s/MESA_FORMAT_XBGR32323232_SINT\b/MESA_FORMAT_RGBX_SINT32/g s/MESA_FORMAT_XBGR8888_UINT\b/MESA_FORMAT_RGBX_UINT8/g s/MESA_FORMAT_XBGR8888_SINT\b/MESA_FORMAT_RGBX_SINT8/g
2014-01-27mesa: Rename 4 color component unsigned byte MESA_FORMATsMark Mueller1-8/+8
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
2014-01-27mesa: change gl_format to mesa_formatMark Mueller1-2/+2
s/\bgl_format\b/mesa_format/g. Use better name for Mesa Formats enum
2013-10-24radeon: Build the driver into the shared mesa_dri_drivers.so.Eric Anholt1-2/+24
This required some reordering of headers to ensure that the symbol name redefines happened before any prototypes. v2: drop dridir now that it's unused. v3: Consistently put spaces around += in the updated Makefile.am blocks. 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 <mattst88@gmail.com> (v2) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-10-24dri: Move driver config options to dri driver extensions.Eric Anholt1-7/+12
This way they aren't all sitting in the global namespace (with the same name per driver). Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2013-10-10dri: Move API version validation into dri/common.Eric Anholt1-0/+3
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 <kenneth@whitecape.org>
2013-08-17dri: Choose a decent global driNConfigOptions.Eric Anholt1-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 <kenneth@whitecape.org>
2013-06-28mesa: Remove unused allow_large_textures driconf from classic drivers.Eric Anholt1-4/+2
This option hasn't been used since the introduction of DRI2. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-04-19mesa: Use quotes on bool driconf options to prevent stdbool.h breakage.Eric Anholt1-8/+8
Since stdbool.h's "true" and "false" are #defines, they got expanded when used as macro arguments, and that expanded value was stored in the XML string, producing XML that driconf would then fail to parse. Currently no drivers included stdbool along with driconf, but I keep accidentally doing so on intel as we move towards using normal C. v2: rebase on master. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
2013-02-11radeon: Remove dead STANDALONE_MMIO definesMatt Turner1-1/+0
These were, at some point in the past, used to request that Xorg's compiler.h export a static inline xf86ReadMmio32 instead of a function pointer. compiler.h only has this option for DEC Alpha. But Xorg's compiler.h isn't being included by either of these two files and the radeon driver still works on Alpha, so the definitions are dead and not needed. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-02-08Consolidate some redundant definitions of ARRAY_SIZE() macro.Paul Berry1-2/+0
Previous to this patch, there were 13 identical definitions of this macro in Mesa source. That's ridiculous. This patch consolidates 6 of them to a single definition in src/mesa/main/macros.h. Unfortunately, I wasn't able to eliminate the remaining definitions, since they occur in places that don't include src/mesa/main/macros.h: - include/pci_ids/pci_id_driver_map.h - src/egl/drivers/dri2/egl_dri2.h - src/egl/main/egldefines.h - src/gbm/main/backend.c - src/gbm/main/gbm.c - src/glx/glxclient.h - src/mapi/mapi/stub.c I'm open to suggestions as to how to deal with the remaining redundancy. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-12-02glx/dri2: add and use new driver hook flush_with_flagsMarek Olšák1-1/+1
2012-11-30radeon: Fix memory leak in radeonCreateScreen2.Vinson Lee1-1/+3
Fixes a memory leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-29dri: Convert driCreateConfigs to use a gl_format enumIan Romanick1-13/+7
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 <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-15r200: Remove support for software-only NV_vertex_program.Eric Anholt1-4/+1
It wasn't supported in hardware, and the comments in the code indicated no known uses (similar to my experience on Intel) and a possible intent to remove it. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-05radeon/r200: make radeon_context subclass of gl_contextBrian Paul1-3/+3
radeon_context now contains a gl_context, rather than a pointer to one. This will allow some minor core Mesa clean-up.
2012-09-05Don't cast the return value of malloc/reallocMatt Turner1-1/+1
This patch has been generated by the following Coccinelle semantic patch: // Don't cast the return value of malloc/realloc. // // Casting the return value of malloc/realloc only stands to hide // errors. @@ type T; expression E1, E2; @@ - (T) ( _mesa_align_calloc(E1, E2) | _mesa_align_malloc(E1, E2) | calloc(E1, E2) | malloc(E1) | realloc(E1, E2) )
2012-09-01mesa: s/FREE/free/Brian Paul1-5/+5
v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-09-01mesa: s/CALLOC/calloc/Brian Paul1-4/+4
v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-08-07dri: Simplify use of driConcatConfigsChad Versace1-4/+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: <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2012-02-22gbm: track buffer format through DRI driversJesse Barnes1-0/+2
GBM needs the buffer format in order to communicate with DRM and clients for things like scanout. So track the DRI format requested in the various back ends and use it to return the DRI format back to GBM when requested. GBM will then map this into the GBM surface type (which is in turn based on the DRM fb format list). Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2012-01-30Rename R300_NO_TCL envvar to RADEON_NO_TCLMatt Turner1-1/+1
The envvar works for R100 and R200 too, and the classic R300 driver doesn't even exist anymore. "RADEON_NO_TCL" is already mentioned in the code and is the same envvar used for the R300g driver.
2012-01-24radeon: derive radeon_renderbuffer from swrast_renderbufferBrian Paul1-6/+6
2012-01-24mesa: remove gl_renderbuffer::DataTypeBrian Paul1-1/+1
2012-01-18gbm: Validate usage flags in gbm_bo_create_from_egl_image()Kristian Høgsberg1-1/+1
The entry point is supposed to validate that the EGLImage is suitable for the passed in usage flags, but that was never implemented.
2011-12-08mesa/drivers: use new swrast renderbuffer functionsBrian Paul1-1/+2
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-12-06radeon: add original r100 to the always tiled depth list.Dave Airlie1-1/+1
According to Alex, he thinks r100 is also covered. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-06radeon/r200: add RV200 detiling + add an always tiled flagDave Airlie1-4/+5
passes readpix sanity on the M7. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-14radeon: further cleanup of shared codeFabio Pedretti1-12/+2
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-11-14radeon: add some missing FireMV pci idsAlex Deucher1-0/+1
Note: this is a candidate for the stable branches. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-11-07radeon: cleanup radeon shared code after r300 and r600 classic drivers removalFabio Pedretti1-580/+8
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-04dri: move __driUtilMessage to xmlconfig.cGeorge Sapountzis1-2/+1
__driUtilMessage seems to have fallen out of favor and is only used by xmlconfig.c now
2011-11-04dri: unify __DRIscreenRecGeorge Sapountzis1-7/+7
Also drop DriverAPI field, this is a static symbol and I don't see why it should be accessed through __DRIscreenRec
2011-11-04dri: unify __DriverAPIRecGeorge Sapountzis1-2/+1
I dropped the comments because they don't add much.
2011-11-02dri: Remove dri2.enabled flagKristian Høgsberg1-2/+0
DRI2 is always enabled now.
2011-11-02dri: Remove remaining DRI1 vblank codeKristian Høgsberg1-1/+0
2011-11-02dri: Remove driMediaStreamCounterExtensionKristian Høgsberg1-3/+0
Also DRI1-only.
2011-11-02dri: Remove driSwapControlExtensionKristian Høgsberg1-3/+1
DRI1-only as well.
2011-11-02dri: Drop driCopySubBufferExtensionKristian Høgsberg1-1/+0
Another DRI1-only extension.
2011-11-02dri: Drop driReadDrawableExtensionKristian Høgsberg1-1/+0
All DRI2 drivers support setting a separate read drawable.
2011-11-02dri: Drop driLegacyExtensionKristian Høgsberg1-1/+0
There are no DRI1 drivers left.
2011-10-30radeon/r200: drop remains of r300/r600 support along with old drm 1.x kernelDave Airlie1-170/+0
This drops all the old drmSupports* checks since KMS does them all, and it also drop R300_CLASS and R600_CLASS. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-29radeon/r200: drop remains of non-libdrm_radeon buildDave Airlie1-2/+0
These wrappers and associated symlinks were from the non-libdrm_radeon build. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-28radeon: Drop some remaining DRI1 vblank support code.Eric Anholt1-33/+0
2011-10-28radeon: Drop the DRI1 zero-copy TFP code.Eric Anholt1-11/+0