summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon/radeon_common.c
AgeCommit message (Collapse)AuthorFilesLines
2017-06-22mesa: replace _mesa_update_stencil() with helper functionsMarek Olšák1-1/+0
The idea is to remove the dependency on _mesa_update_state_locked, so that st/mesa can skip it for stencil state updates, and then stop setting _NEW_STENCIL in mesa/main if the driver is st/mesa. The main motivation is to stop invoking _mesa_update_state_locked for certain state groups. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2017-01-13radeon: Unify the style of function pointer calls in structsBoyan Ding1-4/+4
Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com> [Emil Velikov: handle the all cases] Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2015-07-20mesa: Rename _mesa_lookup_enum_by_nr() to _mesa_enum_to_string().Kenneth Graunke1-1/+1
Generated by sed; no manual changes. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2015-07-13radeon: remove dri_mirror stateEmil Velikov1-9/+9
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>
2015-05-14main: Refactor _mesa_update_draw_buffer_bounds.Laura Ekstrand1-1/+1
Reviewed-by: Fredrik Höglund <fredrik@kde.org> Signed-off-by: Fredrik Höglund <fredrik@kde.org>
2015-05-14main: Refactor _mesa_update_framebuffer.Laura Ekstrand1-1/+1
_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>
2015-04-21radeon: replace __FUNCTION__ with __func__Marius Predut1-6/+6
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>
2015-02-26radeon: replace INLINE with inlineBrian Paul1-2/+2
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-08-21dri/radeon: cleanup the radeon_context vtblEmil Velikov1-3/+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>
2014-08-09radeon,r200: fix buffer validation after CS flushMarek Olšák1-13/+1
This validates all bound buffers (CB, ZB, textures, DMA) at the beginning of CS. This fixes "bo->space_accouned" assertion failures. Tested by: Jochen Rollwagen <joro-2013@t-online.de> Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-01-23radeon / r200: Eliminate BEGIN_BATCH_NO_AUTOSTATEIan Romanick1-1/+1
Sed job: grep -lr BEGIN_BATCH_NO_AUTOSTATE src/mesa/drivers/dri/ | while read f do cat $f | sed 's/BEGIN_BATCH_NO_AUTOSTATE/BEGIN_BATCH/g' > x mv x $f done Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: Marek Olšák <marek.olsak@amd.com>
2014-01-23radeon / r200: Remove unused 'dostate' parameterIan Romanick1-1/+0
This parameter hasn't been used since January 2010 (commit 29e02c7). Fixes the following warning in both radeon and r200: radeon_common.c: In function 'r200_rcommonBeginBatch': radeon_common.c:762:14: warning: unused parameter 'dostate' [-Wunused-parameter] Note that now BEGIN_BATCH and BEGIN_PATCH_NO_AUTOSTATE are identical. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: Marek Olšák <marek.olsak@amd.com>
2014-01-23radeon / r200: Fix 'empty body' warningIan Romanick1-2/+2
radeon_common.c: In function 'radeon_draw_buffer': radeon_common.c:237:3: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: Marek Olšák <marek.olsak@amd.com>
2014-01-23radeon / r200: Fix incompatible pointer type warningIan Romanick1-2/+1
When parameters were removed from dd_function_table::Viewport (commit 065bd6ff), radeon_viewport (in both radeon and r200) started generating a warning. radeon_common.c: In function 'r200_radeon_viewport': radeon_common.c:415:15: warning: assignment from incompatible pointer type [enabled by default] radeon_common.c:419:23: warning: assignment from incompatible pointer type [enabled by default] I didn't notice this initially, and it's harmless because the function is never called through the incorrectly typed pointer. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: Marek Olšák <marek.olsak@amd.com>
2014-01-20mesa: Update gl_scissor_attrib to support ARB_viewport_arrayCourtney Goeltzenleuchter1-3/+3
Update Mesa and drivers to access updated gl_scissor_attrib. Now have an enable bitfield and array of gl_scissor_rects. Drivers have been updated to the new scissor enable state attribute (gl_context.scissor.EnableFlags) but still treat it as a single boolean which is okay as mesa will only use bit 0 when communicating with a driver that does not support ARB_viewport_array. v2 (idr): Rebase fixes. v3 (idr): Small code formatting fix suggsted by Ken. Signed-off-by: Courtney Goeltzenleuchter <courtney@LunarG.com> Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-01-17s/Tungsten Graphics/VMware/José Fonseca1-1/+1
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/alanh@tungstengraphics.com/alanh@vmware.com/ s/jens@tungstengraphics.com/jowen@vmware.com/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g s/keithw\?@tungstengraphics.com/keithw@vmware.com/g s/michel@tungstengraphics.com/daenzer@vmware.com/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/zack@tungstengraphics.com/zackr@vmware.com/ # 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 <brianp@vmware.com>
2014-01-15mesa: Eliminate parameters to dd_function_table::ScissorIan Romanick1-1/+1
The i830 and i915 drivers used them, but they didn't really need to. They will just be annoying in future patches. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-01-15mesa: Eliminate parameters to dd_function_table::DepthRangeIan Romanick1-3/+1
No driver uses them. They will just be annoying in future patches. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2014-01-15radeon: Remove dead codeIan Romanick1-9/+0
A future patch will rename some of the fields of gl_viewport_attrib, and I don't want to update dead code that I can't test. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: Dave Airlie <airlied@redhat.com>
2013-11-05radeon / r200: Don't pass unused parameters to radeon_viewportIan Romanick1-1/+1
The x, y, width, and height parameters aren't used by radeon_viewport, so don't pass them. This should make future changes to the dd_function_table::Viewport interface a little easier. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jljusten@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Cc: Courtney Goeltzenleuchter <courtney@lunarg.com>
2013-06-25mesa: Remove the Initialized field from framebuffers.Eric Anholt1-2/+0
This existed to tell the core not to call GetBufferSize, except that even if you didn't set it nothing happened because nobody had a GetBufferSize. v2: Remove two more instances of setting the field (from Brian) Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-05radeon/r200: make radeon_context subclass of gl_contextBrian Paul1-12/+12
radeon_context now contains a gl_context, rather than a pointer to one. This will allow some minor core Mesa clean-up.
2012-08-01radeon/r200: get rid of some unneeded cliprect/scissor codeRoland Scheidegger1-53/+3
Noone was interested in the number of cliprects, and noone cared about the intersect result neither. So just nuke this.
2012-05-01radeon: use _mesa_is_winsys/user_fbo() helpersBrian Paul1-5/+6
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-24radeon: derive radeon_renderbuffer from swrast_renderbufferBrian Paul1-2/+2
2011-12-13radeon: stop using _DepthBuffer, _StencilBuffer fieldsBrian Paul1-4/+4
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-11-11radeon: drop unused constant_cliprect fieldDave Airlie1-1/+0
2011-11-03radeon: Fix variable initialization typo.Vinson Lee1-1/+1
Fixes Coverity uninitialized scalar variable defect.
2011-11-02dri: Remove dri2.enabled flagKristian Høgsberg1-3/+0
DRI2 is always enabled now.
2011-11-02dri: Remove remaining DRI1 vblank codeKristian Høgsberg1-2/+0
2011-10-29radeon/r200: drop remains of non-libdrm_radeon buildDave Airlie1-1/+0
These wrappers and associated symlinks were from the non-libdrm_radeon build. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-28radeon: Simplify cliprects computation now that there's just 1.Eric Anholt1-62/+14
This can probably be reduced even further by moving this logic to the scissor state update or just removing the logic entirely, but I don't trust myself in radeon quite that much.
2011-10-28radeon: Drop dri2 checks now that it's always true.Eric Anholt1-72/+0
This makes LOCK_HARDWARE empty, so it goes away.
2011-10-28radeon: Drop the DRI1 swapbuffers implementation.Eric Anholt1-287/+0
2011-10-28radeon: Drop the non-kernel-memory-manager support, and thus DRI1.Eric Anholt1-96/+21
It's past time, and it was going to get in the way of the renderbuffer mapping refactor. We dropped all the other DRI1 drivers for this release, and I can't imagine anybody supporting DRI1 radeon classic in a new release of Mesa. Diff produced by treating kernel_mm as true, deleting the DRI1 paths that produce kernel_mm false, and deleting code.
2011-08-02radeon: Remove some remaining set-but-unused variables.Eric Anholt1-8/+0
These looked more like copy-and-paste to me than the others (which looked more like possibly someone forgot to write some code in a refactor), so I didn't verify where they came from.
2011-04-19r600c: add big endian support for r6xx/r7xxCédric Cano1-1/+1
Signed-off-by: Cedric Cano <ccano@interfaceconcept.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-12radeon: Remove setup of the old dri/ meta code, which is now unused.Eric Anholt1-1/+1
2010-11-08radeon: Implement EGL_MESA_no_surface_extensionJohann Rudloff1-0/+4
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg1-14/+14
2010-08-02radeon: Add DRI2 flush extension support, so we synchronize properly.Mario Kleiner1-10/+5
When a DRI2 swap buffer is pending we need to make sure we have the flush extension so radeon doesn't resume rendering to or reading from the not yet blitted front buffer. This fixes: https://bugs.freedesktop.org/show_bug.cgi?id=28341 https://bugs.freedesktop.org/show_bug.cgi?id=28410 Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
2010-03-07radeon: no need to emit full state twice after flushMaciej Cencora1-5/+0
2010-01-27radeon/r200/r300: don't clean non-emitted state.Dave Airlie1-1/+2
So if we don't actually emit an atom to the hw because we don't need it in the current state (e.g. lighting related atoms when lighting is off) then don't mark it as clean, because when lighting gets switched on we won't emit it at all. This fixes funky gears colors. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-04Remove leftover __DRI{screen,drawable,context}Private referencesKristian Høgsberg1-12/+12
As part of the DRI driver interface rewrite I merged __DRIscreenPrivate and __DRIscreen, and likewise for __DRIdrawablePrivate and __DRIcontextPrivate. I left typedefs in place though, to avoid renaming all the *Private use internal to the driver. That was probably a mistake, and it turns out a one-line find+sed combo can do the mass rename. Better late than never.
2009-12-22mesa: Remove _mesa_exit wrapper for exit().Eric Anholt1-1/+1
It does nothing else while being less useful than exit() because it lacks attributes that real exit() has.
2009-12-18radeon: fix frontbuffer read/drawpixelsDave Airlie1-1/+23
Bug 25699 The main problem was the optimising flush wasn't doing the front rendering checks properly.
2009-12-08Merge branch 'mesa_7_7_branch'Andre Maasikas1-23/+0
Conflicts: src/mesa/drivers/dri/r600/r700_assembler.c src/mesa/main/version.h
2009-12-07Merge branch 'mesa_7_6_branch' into mesa_7_7_branchIan Romanick1-23/+0
Conflicts: progs/demos/projtex.c progs/xdemos/glxinfo.c src/mesa/main/version.h To fix the confilicts in projtex.c and glxinfo.c I just took the code from mesa_7_6_branch. The conflicts seem to have occured from cherry-picks from mesa_7_7_branch to mesa_7_6_branch followed by commmits just to mesa_7_6_branch.
2009-12-05radeon: Only get DRI2 front buffer information for glXBindTexImageEXT.Michel Dänzer1-4/+4
2009-12-04radeon: fix polygon stippleAlex Deucher1-23/+0
fixes fdo bug 25354 Signed-off-by: Alex Deucher <alexdeucher@gmail.com>