summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Accept GL_DEPTH and GL_STENCIL for window system FBO onlyIan Romanick2011-10-111-12/+27
| | | | | | | | | | Previously GL_DEPTH_BUFFER and GL_STENCIL_BUFFER were (incorrectly) allowed for both. Those enums don't even really exist! Now GL_DEPTH and GL_STENCIL are only allowed for the window system FBO. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallium: rename ZS stencil type to UINT (v2)Dave Airlie2011-10-116-53/+53
| | | | | | | | | | these are never USCALED, always UINT in reality. taken from some work by Christoph Bumiller v2: fixup formatting of table + tabs Signed-off-by: Dave Airlie <[email protected]>
* i965: Change type of brw_context.primitive from GLenum to hardware primitiveChad Versace2011-10-104-43/+41
| | | | | | | | | | | | | | | | | | | For example, GL_TRIANLGES is converted to _3DPRIM_TRILIST. The conversion is necessary because HiZ and MSAA resolve operations emit a 3DPRIM_RECTLIST, which cannot be conveyed by GLenum. As a consequence, brw_gs_prog_key.primitive is also converted. v2 ---- - [anholt] Split brw_set_prim into brw/gen6 variants in previous commit, since not much code is really shared between the two. - [anholt] Replace switch statements with table lookups, since this is a hot path. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* i965: Split brw_set_prim into brw/gen6 variantsChad Versace2011-10-102-2/+19
| | | | | | | | | | | The "slight optimization to avoid the GS program" in brw_set_prim() is not used by Gen 6, since Gen 6 doesn't use a GS program. Also, Gen 6 doesn't use reduced primitives. Also, document that intel_context.reduced_primitive is only used for Gen < 6 Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* mesa: Prevent repeated glDeleteProgram() from blowing away our refcounts.Eric Anholt2011-10-101-3/+5
| | | | | | | | | | | | glDeleteProgram should only be able to remove the one refcount for the user's reference to the program from the hash table (even though that ref does live on in the hash table until the last other ref is removed). Fixes piglit ARB_shader_objects/delete-repeat. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Fix timer query on gen6+Zou Nan hai2011-10-101-5/+12
| | | | | | | | | | | | PIPE_CONTROL reported time stamp are 64 bits value incrementing every 80 ns, and only the low 32 bits are active (high 32 are always 0). v2: Cleaned up whitespace, function arguments (anholt). Fixes piglit EXT_timer_query/time-elapsed Signed-off-by: Zou Nan hai <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
* hash_table: Make string_to_uint_map make a copy of the nameIan Romanick2011-10-101-1/+17
| | | | | | | | | | | | The hash table needs a copy of the key that it can keep for comparisons during searches. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41499 Cc: Stéphane Marchesin <[email protected]> Tested-by: Luzipher <[email protected]> Tested-by: Michał Lipski <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/st: Check for a NULL _LinkedShader[i] before using it.Stéphane Marchesin2011-10-101-1/+2
| | | | | | The rest of the linker/glsl translation code checks for NULL, so I suppose we should check here too. Fixes crash on exit with i915g instanced drawing. Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: add readpixel integer supportDave Airlie2011-10-081-2/+38
| | | | | | This adds support for readpixels integer paths, it deals with the signed/unsigned crossovers. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: add support for int type conversionDave Airlie2011-10-081-67/+386
| | | | | | | This adds the various mesa->gallium and gallium->mesa format conversions along with the GL->gallium texture choosers for integers. Signed-off-by: Dave Airlie <[email protected]>
* mesa/texformat: add integer fallbacks to other formatsDave Airlie2011-10-081-73/+131
| | | | | | | | | This fixes up the integer format choosing to pick the closest mesa format then the most likely fallback. (the formatting in this file needs cleaning in another patch). Signed-off-by: Dave Airlie <[email protected]>
* mesa: add packing for int/uintDave Airlie2011-10-082-0/+68
| | | | | | | This just adds a simple packing for GL_UNSIGNED_INT/GL_INT destination formats. This is enough for at least the gallium drivers to pack both unsigned and signed types for read pixels. Signed-off-by: Dave Airlie <[email protected]>
* i965: Fix inconsistent indentation in brw_eu_emit.c.Kenneth Graunke2011-10-071-197/+197
| | | | | | | | | | | | | | Most of these functions used three spaces for the first level of indentation, but four spaces for the next level. One used tabs and then three spaces. Some used 3/4 in a then block but 3/3 in the else block. Normally I try to avoid field days like this, but since the functions were so inconsistent, even internally, it was making it difficult to edit without introducing spurious whitespace changes. So, just get it over with. git diff -b shows 0 lines changed. Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: Silence several 'warning: unused parameter' in _mesa_GetnUniformdvARBIan Romanick2011-10-071-0/+6
| | | | | | | | | This function isn't implemented yet, so none of its parameters are used yet. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove unused function _mesa_append_uniformIan Romanick2011-10-072-78/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Simplify calling Driver.ProgramStringNotify after previous refactorsIan Romanick2011-10-072-55/+22
| | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Simplify destroy_shader_program_variants_cb after previous refactorsIan Romanick2011-10-071-6/+3
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Simplify validate_shader_program after previous refactorsIan Romanick2011-10-071-11/+6
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Use gl_shader_program::_LinkedShaders instead of FragmentProgramIan Romanick2011-10-0713-34/+36
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Use gl_shader_program::_LinkedShaders instead of GeometryProgramIan Romanick2011-10-079-22/+23
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Use gl_shader_program::_LinkedShaders instead of VertexProgramIan Romanick2011-10-0713-34/+39
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Close Doxygen groupChad Versace2011-10-071-0/+1
| | | | | In dd_function_table, close the Doxygen group beginning with \name Support for multiple T&L engines
* i915,i830: Remove dead HiZ assertions in *update_draw_buffer()Chad Versace2011-10-072-4/+0
| | | | | | | | | | | | i915 and i830 hardware doesn't have HiZ, so remove all HiZ related assertions from *update_draw_buffer(). I've removed the dead format checks completely rather than replace them with more appropriate checks. This doesn't reduce "assertion coverage", however, because when I added these HiZ related assertions in c8fdf66 there were no pre-existing checks there. Signed-off-by: Chad Versace <[email protected]>
* tnl: fix result vector allocation regressionBrian Paul2011-10-071-4/+10
| | | | | | We need to allocate all the output vectors. Fixes a regression from commit f7f678331d5e95d2266fe6b3ea1cfa47d6421065 Fixes fd.o bugs 41441 and 41492.
* i965: make swizzle_for_size() return unsignedBrian Paul2011-10-071-2/+2
| | | | | | | Silences a warning about comparing to an unsigned variable. It looks like the result of swizzle_for_size() is always assigned to unsigned vars. Reviewed-by: Chad Versace <[email protected]>
* i965: make size_swizzles[] static constBrian Paul2011-10-071-1/+1
| | | | Reviewed-by: Chad Versace <[email protected]>
* i965: silence unused var warnings in non-debug buildsBrian Paul2011-10-072-0/+2
| | | | Reviewed-by: Chad Versace <[email protected]>
* intel: silence uninitialized var warningBrian Paul2011-10-071-1/+1
| | | | Reviewed-by: Chad Versace <[email protected]>
* mesa: fix software mipmap generation code for packed Z/stencil formatsBrian Paul2011-10-072-5/+41
| | | | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=32458 Reviewed-by: Chad Versace <[email protected]>
* r300: fix incompatible pointer type warningsBrian Paul2011-10-072-2/+2
|
* mesa: update gl_texture_image commentsBrian Paul2011-10-071-2/+2
|
* swrast: s/FetchTexelf/FetchTexel/Brian Paul2011-10-075-68/+68
|
* swrast: silence unused var warnings in non-debug buildsBrian Paul2011-10-071-0/+2
|
* swrast: remove unused swrast_texture_image::FetchTexelc methodBrian Paul2011-10-072-69/+2
| | | | We only use the float-valued function now.
* mesa: fix image unpacking when storing compressed texturesBrian Paul2011-10-072-6/+19
| | | | | | | | | | | | | | This fixes failures found with the new piglit texsubimage test. Two things were broken: 1. The dxt code doesn't handle sources images where width != row stride. Check for that and take the _mesa_make_temp_ubyte_image() path to get an image where width = rowstride. 2. If we don't take the _mesa_make_temp_ubyte_image() path we need to take the source image unpacking parameters into account in order to get the proper starting memory address of the source texels. Note: This is a candidate for the 7.11 branch.
* i965 Gen6+: De-compact clip planes.Paul Berry2011-10-067-68/+56
| | | | | | | | | | | | | | | | | | | Previously, if the user enabled a non-consecutive set of clip planes (e.g. 0, 1, and 3), the driver would compact them down to a consecutive set starting at 0. This optimization was of dubious value, and complicated the implementation of gl_ClipDistance. This patch changes the driver so that with Gen6 and later chipsets, we no longer compact the clip planes. However, we still discard any clip planes beyond the highest number that is in use, so performance should not be affected for applications that use clip planes consecutively from 0. With chipsets previous to Gen6, we still compact the clip planes, since the pre-Gen6 clipper thread relies on this behavior. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965 VS: Change nr_userclip to nr_userclip_planes.Paul Berry2011-10-064-13/+16
| | | | | | | | | | The only remaining uses of brw_vs_prog_key::nr_userclip only occurred when using clip planes (as opposed to gl_ClipDistance). This patch renames the value to nr_userclip_planes and sets it to zero when gl_ClipDistance is in use. This avoids unnecessary VS recompiles. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Make brw_compute_vue_map's userclip dependency a boolean.Paul Berry2011-10-0613-25/+32
| | | | | | | | | | | | | Previously, brw_compute_vue_map required an argument indicating the number of clip planes in use, but all it did with it was check if it was nonzero. This patch changes brw_compute_vue_map to take a boolean instead. This allows us to avoid some unnecessary recompilation of the Gen4/5 GS and SF threads. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Move ClipPlanesEnabled state to VS cache key.Paul Berry2011-10-063-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Previous to this patch, setup_uniform_clipplane_values() was setting up clip plane uniforms based on ctx->Transform.ClipPlanesEnabled, a piece of state not stored in the vertex shader cache key. As a result, a change to this piece of state might not trigger a necessary vertex shader recompile. The patch adds a field to the vertex shader cache key, userclip_planes_enabled, to store the current value of ctx->Transform.ClipPlanesEnabled. Also, it changes setup_uniform_clipplane_values() to read from this new field, so that it's manifestly clear that the vertex shader isn't depending on state not stored in the cache key. Note: when the vertex shader uses gl_ClipDistance, the VS backend doesn't need to know which clip planes are in use, so we leave the field as zero in that case to avoid unnecessary recompiles. Fixes Piglit test vs-clip-vertex-enables. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Rearrange VS cache key struct.Paul Berry2011-10-061-1/+11
| | | | | | | | | | | No functional change. This patch rearranges the struct brw_vs_prog_key so that the two fields related to clipping are together, and documents those fields. This should make the patches that follow easier to comprehend, since they add additional clipping-related fields to this structure. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Create _mesa_bitcount_64() to replace i965's brw_count_bits()Paul Berry2011-10-0613-21/+30
| | | | | | | | | | | | | | | | The i965 driver already had a function to count bits in a 64-bit uint (brw_count_bits()), but it was buggy (it only counted the bottom 32 bits) and it was clumsy (it had a strange and broken fallback for non-GCC-like compilers, which fortunately was never used). Since Mesa already has a _mesa_bitcount() function, it seems better to just create a _mesa_bitcount_64() function rather than special-case this in the i965 driver. This patch creates the new _mesa_bitcount_64() function and rewrites all of the old brw_count_bits() calls to refer to it. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/es: Allow GL_CLIP_PLANE0+6 and GL_CLIP_PLANE0+7.Kenneth Graunke2011-10-061-8/+6
| | | | | | | | | | Fixes the ES1 conformance 'userclip' test, which broke when we increased MAX_CLIP_PLANES to 8. Core Mesa already validates incoming values against MAX_CLIP_PLANES; we just need the ES wrapper to pass everything through. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa/get: Move MAX_LIGHTS from GL/ES2 to GL/ES1.Kenneth Graunke2011-10-061-2/+1
| | | | | | | | | | It's required for ES 1.0 and 1.1, and isn't specified for ES 2. While the comment says Mesa depends on it internally, removing it from ES2 doesn't seem to regress any Piglit or ES2 conformance tests. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* meta: Don't enable TEXTURE_RECTANGLE when it's unsupported.Kenneth Graunke2011-10-061-1/+2
| | | | | | | | | In particular, drivers don't enable this in ES 1.1 contexts. Prior to this, none of the OpenGL ES 1.1 conformance tests passed. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove some unneeded forward struct declarationsBrian Paul2011-10-051-3/+0
|
* st/mesa: fix commentBrian Paul2011-10-051-1/+1
|
* mesa: remove unused _mesa_rescale_teximage2d() functionBrian Paul2011-10-052-84/+0
| | | | It was only used by the old tdfx driver, IIRC.
* mesa: remove unused gl_texture_image::DriverData fieldBrian Paul2011-10-052-8/+0
| | | | Was only used by some older/removed DRI drivers.
* st/mesa: don't use gl_texture_image::RowStrideBrian Paul2011-10-051-5/+7
| | | | It's always the same as the texture width.
* st/mesa: completely stop using gl_texture_image::DataBrian Paul2011-10-052-14/+19
| | | | | Instead, use the new st_texture_image::TexData field to hold texture images that don't fit the parent object's mipmap buffer.