summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
Commit message (Collapse)AuthorAgeFilesLines
* swrast: replace __FUNCTION__ with __func__Marius Predut2015-04-143-4/+4
| | | | | | | | | | | Consistently just use C99's __func__ everywhere. The patch was verified with Microsoft Visual studio 2013 redistributable package(RTM version number: 18.0.21005.1) Next MSVC versions intends to support __func__. No functional changes. Acked-by: Matt Turner <[email protected]> Signed-off-by: Marius Predut <[email protected]>
* swrast: Mark MAX_GLUINT literal with u suffix.Matt Turner2015-04-131-1/+1
| | | | | | | | Coverity is confused by the "float < int / 2" expression and suggests casting MAX_GLUINT to unsigned, which I believe it was supposed to have been already. Reviewed-by: Brian Paul <[email protected]>
* swrast: remove unneeded #include of colormac.hBrian Paul2015-04-0117-17/+3
| | | | | Acked-by: Matt Turner <[email protected]> Reviewed-by: Mark Janes <[email protected]>
* swrast: Use BITFIELD64_BIT for arrayAttribs.Jose Fonseca2015-03-181-1/+1
| | | | | | | | | As VARYING_SLOT_MAX can be bigger than 32. I'll probably stop building swrast with MSVC in the near future, but this seems a real bug regardless. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove _ASMAPI, ASMAPIPBrian Paul2015-03-121-1/+1
| | | | Reviewed-by: Ian Romanick <[email protected]>
* swrast: remove _BLENDAPIBrian Paul2015-03-122-16/+13
| | | | | | | _BLENDAPI boils down to __cdecl on Windows, but __cdecl is the default calling convention so this serves no purpose. Reviewed-by: Ian Romanick <[email protected]>
* mesa/swrast: replace Elements() with ARRAY_SIZE()Brian Paul2015-03-022-2/+2
| | | | Acked-by: Ilia Mirkin <[email protected]>
* mesa: remove MAX_GLUSHORT, move MAX_GLUINTBrian Paul2015-02-241-0/+5
| | | | | | The later is only used in one place in swrast. Reviewed-by: Matt Turner <[email protected]>
* mesa: remove logf macroBrian Paul2015-02-241-0/+1
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: replace FABSF with fabsfBrian Paul2015-02-243-13/+15
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: replace LOGF, EXPF with logf, expfBrian Paul2015-02-242-5/+6
| | | | Reviewed-by: Matt Turner <[email protected]>
* swrast: fix a few release build warningsBrian Paul2015-02-242-0/+2
|
* mesa: Use assert() instead of ASSERT wrapper.Matt Turner2015-02-2328-245/+245
| | | | Acked-by: Eric Anholt <[email protected]>
* swrast: fix multiple color buffer writingBrian Paul2015-02-191-11/+14
| | | | | | | | | | If a fragment program wrote to more than one color buffer, the first fragment color got replicated to all dest buffers. This fixes 5 piglit FBO tests, including fbo-drawbuffers-arbfp. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45348 Cc: "10.4, 10.5" <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* swrast: Whitespace fixes.Laura Ekstrand2015-02-023-12/+12
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* DD: Refactor BlitFramebuffer.Laura Ekstrand2015-02-023-27/+35
| | | | | | | | | In preparation for glBlitNamedFramebuffer, the DD table function BlitFramebuffer needs to accept two arbitrary framebuffer objects rather than assuming ctx->ReadBuffer and ctx->DrawBuffer. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: support GL_RGB for GL_EXT_texture_type_2_10_10_10_REVTapani Pälli2015-01-191-0/+2
| | | | | | | | | | | | | | | | | Commit 8ec6534 changed texture upload path and the way how texture format is being checked, this commit adds support for GL_RGB with GL_UNSIGNED_INT_2_10_10_10_REV as specified by the extension EXT_texture_type_2_10_10_10_REV specification. This fixes regression in ES3 conformance test ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels v2: add MESA_FORMAT_R10G10B10X2_UNORM format (Iago Toral) Signed-off-by: Tapani Pälli <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88385 Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* mesa: rename RGBA8888_* format constants to something appropriate.Iago Toral Quiroga2015-01-141-1/+1
| | | | | | | | The 8888 suggests 8-bit components which is not correct, so replace that with the actual size of the components in each format. Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: restrict use of GL_ABGR_EXT format to allowed data typesSamuel Iglesias Gonsalvez2015-01-121-4/+0
| | | | | | | | | | | | | GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV data types are not explicitly allowed to work with GL_ABGR_EXT format neither in GL nor GL_EXT_abgr specs. Removed the corresponding mesa formats as there are no other functions using them inside Mesa anymore. Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* swrast: Use _mesa_format_convert to implement draw_rgba_pixels.Iago Toral Quiroga2015-01-121-4/+34
| | | | | | | This is the only place that uses _mesa_unpack_color_span_float so after this we should be able to remove that function. Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: use format conversion functions in swrastSamuel Iglesias Gonsalvez2015-01-121-1237/+122
| | | | | | | | This commit adds a macro to facilitate the task of using format conversions functions but keeps the same API. Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa/formats: add new mesa formats and their pack/unpack functions.Samuel Iglesias Gonsalvez2015-01-121-0/+13
| | | | | | | | | | | | | This will be used to refactor code in pack.c and support conversion to/from these types in a master convert function that will be added later. v2: - Fix autogeneration of MESA_FORMAT_A2R10G10B10_UNORM pack/unpack functions Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* swrast: Remove unused variable.Iago Toral Quiroga2015-01-121-3/+0
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: Fix A1R5G5B5 packing/unpackingJason Ekstrand2015-01-121-4/+4
| | | | | | | | As with B5G6R5, these have been left broken with comments saying they are. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Fix packing/unpacking of MESA_FORMAT_R5G6B5_UNORMJason Ekstrand2015-01-121-4/+4
| | | | | | | | | | | | | | Aparently, the packing/unpacking functions for these formats have differed from the format description in formats.h. Instead of fixing this, people simply left a comment saying it was broken. Let's actually fix it for real. v2 by Samuel Iglesias <[email protected]>: - Fix comment in formats.h Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa: create, use new _mesa_texture_base_format() functionBrian Paul2015-01-051-1/+1
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swrast: use new _mesa_base_tex_image() helperBrian Paul2015-01-056-42/+47
| | | | Reviewed-by: Eric Anholt <[email protected]>
* swrast: Remove 'inline' from tex filter functions.Matt Turner2014-12-081-26/+26
| | | | | | | | | | Reduces .text size of mesa_dri_drivers.so (i965-only) by 62k, or 1.4%. Note that we don't remove inline from lerp_2d(), which has a comment above it saying it definitely should be inlined. Though, removing the inline keyword from it doesn't actually change the compiled code for me. Reviewed-by: Brian Paul <[email protected]>
* mesa: Add MESA_FORMAT_{A8R8G8B8, X8R8G8B8, X8B8G8R8}_SRGB (v2)Richard Sandiford2014-09-172-0/+27
| | | | | | | | | | | | This means that each 8888 SRGB format has a reversed counterpart, which is necessary for handling big-endian mesa<->gallium mappings. v2: fix missing i965 additions. (Jason) fix 127->255 max alpha for SRGB formats. (Jason) v1: Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Richard Sandiford <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: Add MESA_FORMAT_A8L8_{SNORM,SRGB}Richard Sandiford2014-09-172-0/+26
| | | | | | | | | | | | | The associated UNORM format already existed. This means that each LnAn format has a reversed counterpart, which is necessary for handling big-endian mesa<->gallium mappings. [airlied: rebased onto current master] Signed-off-by: Richard Sandiford <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* swrast: Fix handling of MESA_FORMAT_L8A8_SRGB for big-endianRichard Sandiford2014-09-171-3/+3
| | | | | | | | | | | | Luminance is the least-significant byte of the uint16, rather than the lowest byte in memory. Other parts of mesa already handle this correctly for big-endian, and swrast already handles other MESA_FORMAT_x8y8 formats correctly. This case was just an odd-one-out. Signed-off-by: Richard Sandiford <[email protected]> Reviewed-by: Brian Paul <[email protected]> Cc: <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* swrast: s/INLINE/inline/Brian Paul2014-09-041-1/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add the format enums for BPTC-compressed imagesNeil Roberts2014-08-121-0/+24
| | | | | | | | | | | | | | | | | | This adds the following four Mesa image format enums which correspond to the four BPTC compressed texture formats: MESA_FORMAT_BPTC_RGBA_UNORM MESA_FORMAT_BPTC_SRGB_ALPHA_UNORM MESA_FORMAT_BPTC_RGB_SIGNED_FLOAT MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT It also updates the format information functions to handle these and the corresponding GL enums. v2: Also modify _mesa_get_format_color_encoding, _mesa_get_srgb_format_linear and _mesa_get_uncompressed_format Reviewed-by: Ian Romanick <[email protected]>
* mesa/main: Use the RGB <-> sRGB conversion functions in libmesautilJason Ekstrand2014-08-042-46/+18
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* Remove the ATI_envmap_bumpmap extensionJason Ekstrand2014-06-303-93/+1
| | | | | | | | | | | As far as I can tell, the Intel mesa driver is the only driver in the world still supporting this legacy extension. If someone wants to do bump mapping, they can use shaders. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> [v1] Reviewed-by: Chris Forbes <[email protected]> [v2] Reviewed-by: Ian Romanick <[email protected]> [v3]
* swrast: Remove unused solve_plane_recip().Matt Turner2014-06-171-14/+0
| | | | | | | Unused since commit 9e8a961d. Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* swrast: Drop remaining use of _ReallyEnabled.Eric Anholt2014-04-301-1/+1
| | | | | | | | The _MaxEnabledTexImageUnit check assures us that Unit[0].Current != NULL. This is the last consumer of _ReallyEnabled outside of the radeons. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Replace use of _ReallyEnabled as a boolean with use of _Current.Eric Anholt2014-04-303-12/+10
| | | | | | | | | | | | | I'm probably not the only person that has tried to kill _ReallyEnabled. This does the mechanical part of the work, and cleans _ReallyEnabled from i965. I think that using _Current makes texture management clearer: You can't have multiple targets in use in the same texture image unit at the same time, because there's just that one pointer. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Drop _EnabledUnits.Eric Anholt2014-04-303-20/+15
| | | | | | | | | | | The field wasn't really valid, since we've got more than 32 units now. It turns out it was mostly just used for checking != 0, or checking for fixed function coordinates, though. v2: Fix mis-conversion in xm_line.c (caught by Ken). Reviewed-by: Matt Turner <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]>
* swrast: Just use _EnabledCoordUnits for figuring out which texcoords to build.Eric Anholt2014-04-301-1/+1
| | | | | | | | | | | | | _EnabledUnits is all of the first 32 image units that are used by fixed function or programs, while _EnabledCoordUnits is just which fixed function fragment shader texcoords need to be generated. This is a theoretical bugfix in the case of a vertex shader texturing from large texture image unit number (we'd end up flagging something other than a VARYING_SLOT_TEXn as needing to be generated), but it's actually just motivated by trying to kill _EnabledUnits. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* swrast: move texture_slices() calls out of loopsBrian Paul2014-04-241-4/+8
| | | | Reviewed-by: José Fonseca <[email protected]>
* swrast: move null pointer check earlier in _swrast_map_teximage()Brian Paul2014-04-241-6/+9
| | | | | | | There's no reason to compute texel size, stride, etc. if there's no image data to map. Reviewed-by: José Fonseca <[email protected]>
* swrast: remove _mesa_ prefix from static functionBrian Paul2014-04-241-3/+3
| | | | | | And add a const qualifier. Reviewed-by: José Fonseca <[email protected]>
* swrast: allocate swrast_texture_image::ImageSlices array if neededBrian Paul2014-04-241-0/+10
| | | | | | | | | | | Fixes a segmentation fault in conform divzero.c test. This happens when glTexImage(level, width=0, height=0) is called. We don't allocate texture memory in that case so the ImageSlices array was never allocated. Cc: "10.1" <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* swrast: Add glBlitFramebuffer to commands affected by conditional renderingAnuj Phogat2014-04-171-0/+8
| | | | | | Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: use macros to initialize texfetch_funcs[] tableBrian Paul2014-04-111-937/+172
| | | | Reviewed-by: Ian Romanick <[email protected]>
* swrast: fix more fetch_texel function namesBrian Paul2014-04-112-37/+37
| | | | | | | | | | These were missed/typo'd in the previous patch series: s/R8G8B8A/R8G8B8A8/ s/rgba_16/RGBA_UNORM16/ s/rgba_uint/RGBA_UINT/ s/rgba_int/RGBA_SINT/ Reviewed-by: Ian Romanick <[email protected]>
* swrast: Add support for fetching from MESA_FORMAT_R10G10B10A2_UNORMChris Forbes2014-04-102-3/+16
| | | | | | | | | | V4: Fix rebase conflicts with Brian's renaming of the texfetch functions. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Eric Anholt <[email protected]>
* swrast: reindent s_texfetch_temp.h, remove trailing whitespaceBrian Paul2014-04-071-182/+261
| | | | Reviewed-by: Ian Romanick <[email protected]>
* swrast: remove out of date comments in s_texfetch_tmp.hBrian Paul2014-04-071-457/+10
| | | | | | | The comments were out of date and redundant (the functions are pretty much self-explanatory). Reviewed-by: Ian Romanick <[email protected]>