summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove 'params' parameter from ctx->Driver.TexParameter()Brian Paul2016-10-131-1/+1
| | | | | | | | | | | None of the drivers which implement this hook do anything with the texture parameter value. Drivers just look at the pname and set a dirty flag if needed. We were doing some ugly casting and type conversion to setup the argument so that all goes away. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* dri: add a way to request that modes have matching color/zs depthsIlia Mirkin2016-08-231-1/+1
| | | | | | | | | | Some GPUs, notably nv3x/nv4x can't render to mismatched color/zs framebuffer depths. Fallbacks can be done by the driver, with shadow surfaces, but no reason to encourage applications to select non-matching glx visuals. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* radeon/r200: Use bitmask/ffs to iterate enabled clip planes.Mathias Fröhlich2016-06-161-10/+9
| | | | | | | | | | | Replaces an iterate and test bit in a bitmask loop by a loop only iterating over the bits set in the bitmask. v2: Use _mesa_bit_scan{,64} instead of open coding. v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
* radeon/r200: Use bitmask/ffs to iterate enabled lightsMathias Fröhlich2016-06-161-21/+21
| | | | | | | | | | | | Replaces a loop that iterates all lights and test which of them is enabled by a loop only iterating over the bits set in the enabled bitmask. v2: Use _mesa_bit_scan{,64} instead of open coding. v3: Use u_bit_scan{,64} instead of _mesa_bit_scan{,64}. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
* radeon: use _mesa_delete_buffer_objectNicolai Hähnle2016-01-071-1/+1
| | | | | | | | | This is more future-proof, plugs the memory leak of Label and properly destroys the buffer mutex. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* radeon: const correctnessGiuseppe Bilotta2015-12-041-1/+1
| | | | | | | | Add missing `const` specifier for pointer pointing to a const struct. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* radeon: whitespace cleanupGiuseppe Bilotta2015-12-041-2/+2
| | | | | | Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* radeon: fix bgrx8/xrgb8 blitsRoland Scheidegger2015-11-171-0/+2
| | | | | | | | | | | | | | | | Since d21320f6258b2e1780a15c1ca718963d8a15ca18 the same txformat table entries are used for "normal" texturing as well as for blits. However, I forgot to put in an entry for the bgrx8 (le) and xrgb8 (be) formats - the normal texturing path can't hit them because the radeon tex format chooser will never chose them, but we get that format from the dri buffers (at least I assume we got it from there). This caused lots of piglit regressions (and probably lots of trouble outside piglit too). This fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=92900. Tested-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: "11.0" <mesa-stable@lists.freedesktop.org>
* util: Move DRI parse_debug_string() to utilKristian Høgsberg Kristensen2015-10-082-5/+5
| | | | | | | | | | We want to use intel_debug.c in code that doesn't link to dri common. v2: Remove unnecessary stddef.h include (Topi), use util/debug.h in all DRI driver and remove driParseDebugString() (Iago). Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Signed-off-by: Kristian Høgsberg Kristensen <krh@bitplanet.net>
* radeon/r200: remove unneeded #include of colormac.hMark Janes2015-10-064-4/+0
| | | | Reviewed-by: Matt Turner <mattst88@gmail.com>
* radeon: Don't override NewFramebuffer just to call _mesa_new_framebufferIan Romanick2015-10-061-7/+0
| | | | | | Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* radeon: Use C99 initializers for primitive arraysIan Romanick2015-10-061-20/+20
| | | | | | | | | | Using C99 initializers for the primitive arrays makes things more readable. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Suggested-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* mesa: remove Driver.HintMarek Olšák2015-10-031-1/+0
| | | | | | | Nothing sets it. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Remove unused HAVE_TRI_STRIP_1 definesIan Romanick2015-09-232-2/+0
| | | | | | | Defined to 0 in a few places, but it's not used anywhere. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* t_dd_dmatmp: Remove HAVE_QUADS supportIan Romanick2015-09-231-1/+0
| | | | | | | | | Two drivers use this file, and neither supports quads. No piglit regressions on i915 (G33) or radeon (Radeon 7500). Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* t_dd_dmatmp: Remove HAVE_QUAD_STRIPS supportIan Romanick2015-09-231-1/+0
| | | | | | | | | Two drivers use this file, and neither supports quad strips. No piglit regressions on i915 (G33) or radeon (Radeon 7500). Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* t_dd_dmatmp: Make "count" actually be the countIan Romanick2015-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | The value passed in count previously was "vertex after the last vertex to be processed." Calling that "count" was misleading and kind of mean. Looking at the code, many functions immediately do "count-start" to get back the true count. That's just silly. If it is better for the loops to be 'for (j = start; j < (start + count); j++)', GCC will do that transformation. NOTE: There is some strange formatting left by this patch. That was done to make it more obvious that the before and after code is equivalent. These will be fixed in the next patch. No piglit regressions on i915 (G33) or radeon (Radeon 7500). v2: Fix a remaining (count-start) in render_quad_strip_verts. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> [v1] Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
* mesa: Use floats for viewport bounds.Matt Turner2015-07-291-1/+1
| | | | | | | | | | | | | | | | | | ARB_viewport_array specifies that DEPTH_RANGE consists of double- precision parameters (corresponding commit d4dc35987), and a preparatory commit (6340e609a) added _mesa_get_viewport_xform() which returned double-precision scale[3] and translate[3] vectors, even though X, Y, Width, and Height were still floats. All users of _mesa_get_viewport_xform() immediately convert the double scale and translation vectors into floats (which were floats originally, but were converted to doubles in _mesa_get_viewport_xform(), sigh). i965 at least cannot consume doubles (see SF_CLIP_VIEWPORT). If we want to pass doubles to hardware, we should have a different function that does that. Acked-by: Mathias Froehlich <Mathias.Froehlich@web.de>
* radeon: Silence GCC unused-but-set-variable warnings.Vinson Lee2015-07-231-1/+5
| | | | | | | | | | | | | | | | | | | | | | radeon_fbo.c: In function 'radeon_map_renderbuffer_s8z24': radeon_fbo.c:162:9: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ radeon_fbo.c: In function 'radeon_map_renderbuffer_z16': radeon_fbo.c:200:9: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ radeon_fbo.c: In function 'radeon_map_renderbuffer': radeon_fbo.c:242:8: warning: variable 'ret' set but not used [-Wunused-but-set-variable] int ret; ^ radeon_fbo.c: In function 'radeon_unmap_renderbuffer': radeon_fbo.c:419:14: warning: variable 'ok' set but not used [-Wunused-but-set-variable] GLboolean ok; ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* radeon,r200: allow hyperz for radeon DRM module v2Emil Velikov2015-07-221-7/+2
| | | | | | | | | | The original code only half considered hyperz as an option. As per previous commit "major != 2 cannot occur" we can simply things, and allow users to set the option if they choose to do so. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* radeon,r200: remove support for UMS radeon DRM moduleEmil Velikov2015-07-221-27/+17
| | | | | | | | | | | | | | As mentioned by Michel Dänzer "FWIW though, any code which is specific to radeon DRM major version 1 can be removed, because that's the UMS major version." and Marek Olšák "major != 2" can't occur. You don't have to check the major version at all and you can just assume it's always 2." Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* radeon,r200: remove unused variable texmicrotileEmil Velikov2015-07-222-4/+0
| | | | | | | | | | Dead since at least 2009 with commit ccf7814a315(radeon: major cleanups removing old dead codepaths.) Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* mesa: Rename _mesa_lookup_enum_by_nr() to _mesa_enum_to_string().Kenneth Graunke2015-07-208-11/+11
| | | | | | | Generated by sed; no manual changes. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* radeon: fix some potential big endian issuesRoland Scheidegger2015-07-164-90/+76
| | | | | | | | | | | The formats chosen (both by texture format choser, fbo storage allocation) are different for big endian not just for rgba8 but also lower bit width formats (why I don't actually know). Even the function to test for renderable formats used different formats, however the actual colorbuffer setup did not. And the blitter did not take that into account neither. Untested (what could possibly go wrong...). Acked-by: Marek Olšák <marek.olsak@amd.com>
* radeon/r200: mark state atoms as dirty after blitsRoland Scheidegger2015-07-161-0/+8
| | | | | | | | | | | Blit submits lots of packets which are usually handled by state atoms, so these must be dirtied. Not sure if this fixes anything, but it was a concern raised by bug 51658 (with this all issues there seen as actual bugs should be fixed, with the exception of the patch to upload non-used texenv state atoms which I just don't understand). Acked-by: Marek Olšák <marek.olsak@amd.com>
* r200: fix fbo rendering by disabling optimized texture format chooserRoland Scheidegger2015-07-161-1/+13
| | | | | | | | | | | | It is rather unfortunate that we don't know if a texture is going to be used as a rt later, and we lack the means to do something about a format chosen which we can't render to directly, so disable this and always chose renderable format for rgba8 textures. This addresses an issue raised on (old) bug, https://bugs.freedesktop.org/show_bug.cgi?id=51658 with gnome-shell, don't know if that's still applicable but it might fix other things as well. Acked-by: Marek Olšák <marek.olsak@amd.com>
* radeon: remove dri_mirror stateEmil Velikov2015-07-134-31/+15
| | | | | | | | | | | Most of the data stored(duplicated) was unused, and for the one that is follow the approach set by other drivers. This eliminates the use of legacy (dri1) types. Cc: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* radeon: Advertise correct GL_QUERY_COUNTER_BITS/GL_SAMPLES_PASSED valueIan Romanick2015-06-241-0/+23
| | | | | | | | | | | | | | | | | | Commit b765119c changed the default value of all the counter bits to 64. However, older hardware only has 32 counter bits. This has only been build-tested. We don't have any tests that verify the advertised value against implementation behavior, so I don't know what additional testing could be done. NOTE: It appears that many Gallium drivers (at least r300 and i915g) have the same problem, but I don't see a way for the state-tracker to determine the counter size. Marek says, "For Gallium, a new PIPE_CAP or new get_xxx_param function will be needed." Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com>
* main: Refactor _mesa_update_draw_buffer_bounds.Laura Ekstrand2015-05-142-2/+2
| | | | | Reviewed-by: Fredrik Höglund <fredrik@kde.org> Signed-off-by: Fredrik Höglund <fredrik@kde.org>
* main: Refactor _mesa_update_framebuffer.Laura Ekstrand2015-05-142-2/+2
| | | | | | | | | _mesa_update_framebuffer now operates on arbitrary read and draw framebuffers. This allows BlitNamedFramebuffer to update the state of its arbitrary read and draw framebuffers. Reviewed-by: Fredrik Höglund <fredrik@kde.org> Signed-off-by: Fredrik Höglund <fredrik@kde.org>
* main: Rename framebuffer renderbuffer software fallback.Laura Ekstrand2015-05-141-1/+1
| | | | | | | | | Rename _mesa_framebuffer_renderbuffer to _mesa_FramebufferRenderbuffer_sw in preparation for adding the ARB_direct_state_access backend function for FramebufferRenderbuffer and NamedFramebufferRenderbuffer to share. Reviewed-by: Fredrik Höglund <fredrik@kde.org> Signed-off-by: Fredrik Höglund <fredrik@kde.org>
* Fix a few typosZoë Blade2015-04-272-2/+2
| | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* radeon: replace __FUNCTION__ with __func__Marius Predut2015-04-2121-75/+75
| | | | | | | | | Consistently just use C99's __func__ everywhere. No functional changes. Signed-off-by: Marius Predut <marius.predut@intel.com> Acked-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* radeon: Make use of _mesa_get_viewport_xform v2.Mathias Froehlich2015-04-051-8/+9
| | | | | | | | | | | | Instead of _WindowMap just use the translation and scale of the viewport transform directly. Thereby avoid dividing by _DepthMaxF again. v2: Change order of assignments. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
* radeon: replace Elements() with ARRAY_SIZE()Brian Paul2015-03-021-10/+10
| | | | Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
* radeon: replace INLINE with inlineBrian Paul2015-02-265-8/+8
| | | | Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* mesa: replace FABSF with fabsfBrian Paul2015-02-241-1/+2
| | | | Reviewed-by: Matt Turner <mattst88@gmail.com>
* mesa: Use assert() instead of ASSERT wrapper.Matt Turner2015-02-234-9/+9
| | | | Acked-by: Eric Anholt <eric@anholt.net>
* mesa: Use u_math.h from macros.hEric Anholt2015-02-201-2/+0
| | | | | | | | | | This avoids duplication of some macros and other definitions across the tree. Note that COPY_4FV switches from a memcpy-based implementation to an assignment of 4 floats. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* mesa: Add gallium include dirs to more parts of the tree.Eric Anholt2015-02-201-0/+2
| | | | | | v2: Try to patch up the scons bits. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* mesa: add support for GL_EXT_polygon_offset_clampIlia Mirkin2015-02-021-1/+1
| | | | | | | | | | Nothing enables the extension yet, but the values are now available. The spec calls for it to only be exposed for GL 3.3+, which is core-only in mesa. Instead we allow any driver to enable it, including in a compat context for any GL version. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
* mesa: Move simple_list.h to src/util.Eric Anholt2015-01-2811-11/+11
| | | | | | We have two copies of it in the tree, I'm going to delete one. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* radeon: Add headers to distribution.Matt Turner2014-12-122-2/+31
|
* radeon: Alphabetize source list.Matt Turner2014-12-121-9/+9
|
* mesa: Drop the "target" parameter from NewBufferObject().Kenneth Graunke2014-10-161-3/+2
| | | | | | | | | | | NewBufferObject took a "target" parameter, which it blindly passed to _mesa_initialize_buffer_object(), which ignored it. Not much point in passing it around. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* radeon: Use PRINTLIKE macro.Matt Turner2014-09-251-8/+1
|
* dri/radeon: nuke the remaining references to sareaEmil Velikov2014-08-212-4/+0
| | | | | | | | | Remainder of the dri1 times. Cc: Marek Olšák <marek.olsak@amd.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* dri/radeon: cleanup the radeon_context vtblEmil Velikov2014-08-215-86/+0
| | | | | | | | | | Remove the set-but-unused, and set-but-empty vtable entries. Most likely a leftover from the dri1 days. Cc: Marek Olšák <marek.olsak@amd.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* dri/radeon: drop obsolete radeon_{dri,macros}.h headersEmil Velikov2014-08-214-245/+2
| | | | | | | | | | | | | | | | Both have been unused for at least a couple of years. For example the last user of radeon_macros.h was removed with commit 8c11f0a88300f7bc3f05a12789c781ba0f4b3cc6 Author: Eric Anholt <eric@anholt.net> Date: Fri Oct 14 13:27:02 2011 -0700 radeon: Drop the legacy BO manager code. Cc: Marek Olšák <marek.olsak@amd.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* dri/radeon: add GLX_MESA_query_renderer supportEmil Velikov2014-08-154-21/+103
| | | | | | | | | | - Create radeon{Vendor,GetRenderer}String helpers. - Drop __DRI2_RENDERER_PREFERRED_PROFILE case. - Cleanup return statements. To be used by the upcomming GLX_MESA_query_renderer implementation. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>