summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* swrast: be a bit smarter in clip_span()Brian Paul2011-10-131-1/+4
| | | | If no pixels pass the clip test, return false.
* mesa: remove unused gl_sampler_object::_CompleteTexture fieldBrian Paul2011-10-131-3/+0
|
* meta: fix redBits size test in get_temp_image_type()Brian Paul2011-10-131-1/+1
| | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41768
* i965 Gen6+: De-compact clip plane constants for old VS backend.Paul Berry2011-10-131-8/+7
| | | | | | | | | | | | | | | | | | | | | | In commit 018ea68d8780ab5baeef0b8122b8410e5e55ae6d, when I de-compacted clip planes on Gen6+, I updated both the old and new VS back-ends to reflect the change in how clip planes are stored, but I failed to change the code in gen6_vs_state.c that uploads clip plane constants when using the old VS back-end. As a result, if the set of enabled clip planes wasn't contiguous starting with 0, then clipping would not occur properly. This patch corrects gen6_vs_state.c to upload clip plane constants in the new de-compacted form. This only affects the old VS back-end (which is used for fixed-function and ARB vertex programs, not for GLSL vertex shaders). Fixes Piglit test fixed-clip-enables. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41603 Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: kill instruction if writemask=0 in eliminate_dead_code_advanced()Brian Paul2011-10-131-1/+1
| | | | | | | | This fixes a bug where we'd wind up emitting an invalid instruction like MOVE R[0]., R[1]; - note the empty/zero writemask. If we don't write to any dest register channels, cull the instruction. v2: simply change/fix the existing test for instruction culling.
* s/format/baseFormat/ to be more explicitBrian Paul2011-10-131-5/+5
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove redundant buffer checks in copytexsubimage_error_check2()Brian Paul2011-10-131-17/+0
| | | | | | | Again, there was already a call to _mesa_source_buffer_exists() earlier in the function. Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove redundant buffer checks in copytexture_error_check()Brian Paul2011-10-131-16/+0
| | | | | | | There was already a call to _mesa_source_buffer_exists() earlier in the function. Reviewed-by: Eric Anholt <[email protected]>
* mesa: check attachment Type field in renderbuffer_exists()Brian Paul2011-10-131-10/+4
| | | | | | Instead of the renderbuffer pointer. In the future, attaching a texture may not mean the renderbuffer pointer gets set too. Plus, remove some commented-out assertions.
* mesa: consolidate _mesa_source/dest_buffer_exists()Brian Paul2011-10-131-87/+43
| | | | | | v2: add a 'reading' parameter to distinguish between reading and writing to the renderbuffer (we don't want to check if _ColorReadBuffer is null when we're about to draw). Eric found this mistake.
* mesa: make _mesa_update_depth/stencil_buffer() staticBrian Paul2011-10-112-32/+10
| | | | | | | These functions were only called in framebuffer.c where they were defined. Remove the unneeded attIndex parameter too. Reviewed-by: Eric Anholt <[email protected]>
* intel: Assert that no batch is emitted if a region is mappedChad Versace2011-10-113-1/+32
| | | | | | | | | | | | | | | | What I would prefer to assert is that, for each region that is currently mapped, no batch is emitted that uses that region's bo. However, it's much easier to implement this big hammer. Observe that this requires that the batch flush in intel_region_map() be moved to within the map_refcount guard. v2: Add comments (borrowed from anholt's reply) explaining why the assertion is a good idea. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* i965: Fix computation of abs(-x) in FSPaul Berry2011-10-112-1/+5
| | | | | | | | | | | | When updating a register reference to reflect the fact that we were taking its absolute value, the fragment shader back-end failed to clear the negate flag, resulting in abs(-x) getting computed as -abs(x). I also found (and fixed) a similar problem in brw_eu.h, but I'm not aware of an actual manifestation of that problem. Fixes piglit test glsl-fs-abs-neg-with-intermediate.
* i965: Replace incorrect use of GLboolean with enum brw_compression.Kenneth Graunke2011-10-113-5/+9
| | | | | | | | | | | | | | | brw_set_compression_control took a GLboolean as an argument, then promptly used a switch statement to compare it with various enumeration values. Clearly it's not actually a boolean. Introduce a new enumeration type, enum brw_compression, and use that. Found by converting GLboolean to bool; clang then gave warnings about switching on a boolean and ultimately duplicated case errors. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa: Only allow queries of window system FBO on desktop GL w/ARB_fboIan Romanick2011-10-111-0/+15
| | | | | | | | | Neither OES_framebuffer_object nor EXT_framebuffer_object allow querying the window system FBO. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* 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.