summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gallium/cso_cache: remove one call to pipe_sampler_view_referenceMarek Olšák2011-11-041-2/+4
|
* r600g: move SPI setup to PS setupVadim Girlin2011-11-044-74/+73
| | | | | | | | | | | | | | | | | | | | | SPI semantic indices for PS/VS are now static, so we don't need to update spi config for every shaders combination. We can move the functionality of r600_spi_update to r600(evergreen)_pipe_shader_ps. Flatshade state is now controlled by the global FLAT_SHADE_ENA flag instead of updating FLAT_SHADE for all inputs. Sprite coord still requires the update of spi setup when sprite_coord_enable is first changed from zero (enabled), and then only when it's changed to other non-zero value (enabled for other input). Change to zero (disabling) and back to the same value is handled via global SPRITE_COORD_ENA. New field "sprite_coord_enable" added to "struct r600_pipe_shader" to track current state for the pixel shader. It's checked in the r600_update_derived_state. Signed-off-by: Vadim Girlin <[email protected]>
* r600g: precalculate semantic indices for SPI setupVadim Girlin2011-11-045-57/+64
| | | | | | | | | There is no need to duplicate semantic mapping which is done in hw, so get rid of r600_find_vs_semantic_index. TGSI name/sid pair is mapped to the 8-bit semantic index for SPI. Signed-off-by: Vadim Girlin <[email protected]>
* svga: Tighten the register file assertions.José Fonseca2011-11-041-4/+2
| | | | Untested. But should fix fdo 42576.
* radeon/r200: strip texture borders.Dave Airlie2011-11-042-0/+4
| | | | Signed-off-by: Dave Airlie <[email protected]>
* radeon/r200: fix r100/r200 blit to use the offsets.Dave Airlie2011-11-042-4/+4
| | | | | | This is needed to do proper renderbuffer operation on mipmaps. Signed-off-by: Dave Airlie <[email protected]>
* radeon: drop mtface/mtlevel, use ones in base class.Dave Airlie2011-11-043-18/+9
| | | | | | This just uses the base class copies. Signed-off-by: Dave Airlie <[email protected]>
* u_vbuf_mgr: avoid one call to pipe_resource_reference in most casesMarek Olšák2011-11-041-1/+2
|
* swrast: Avoid void * arithmetic.José Fonseca2011-11-041-1/+1
| | | | An error with MSVC.
* i965/gen6: Improve glReadPixels() performance by blitting to a linear temp.Eric Anholt2011-11-032-8/+81
| | | | | | | The readpixels microbenchmark in mesa-demos goes from 47Mpix/sec at 1000x1000 to 450Mpix/sec. The 10x10 sizes stay about the same. Reviewed-by: Brian Paul <[email protected]>
* intel: Add safety asserts for the blit engine's pitch alignment requirements.Eric Anholt2011-11-031-0/+6
| | | | Reviewed-by: Brian Paul <[email protected]>
* intel: Don't force a batchbuffer flush in readpixels.Eric Anholt2011-11-033-3/+12
| | | | | | | | Renderbuffer mapping handles flushing the batchbuffer if required, so all we need to do is make sure any pending rendering has reached the batchbuffer. Reviewed-by: Brian Paul <[email protected]>
* radeon: Remove early dereference of src/dst width in glCopyTexSubImage.Eric Anholt2011-11-031-6/+2
| | | | | | | There doesn't appear to be any particular reason for this -- it's not like the width is changing between the deref and the use. Reviewed-by: Brian Paul <[email protected]>
* swrast: Drop the global mapping of buffers across glReadPixels().Eric Anholt2011-11-031-8/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* swrast: Drop the remaining GetRow-based glReadPixels() fast-path.Eric Anholt2011-11-031-90/+0
| | | | | | | | | In all of piglit, only two tests hit it (reading to RGBA float, where GetRow would drop floats into place from R, RG, or RGB). Mostly this is because _ColorReadClamp has been causing transferOps to always be set, skipping any fast-paths anyway. Reviewed-by: Brian Paul <[email protected]>
* swrast: Remove dead _swrast_read_depth_span_uint().Eric Anholt2011-11-032-88/+0
| | | | | | | All the code using it is converted to MapRenderbuffer and the core unpack functions. Reviewed-by: Brian Paul <[email protected]>
* swrast: Convert color glReadPixels slow path to using MapRenderbuffer.Eric Anholt2011-11-031-72/+33
| | | | | | | | | | | | | | | | | | | This may be a bit slower than before because we're switching from per-format compiled loops in GetRow to _mesa_unpack_rgba_block_unpack's loop around a callback to unpack a pixel. The solution there would be to make _mesa_unpack_rgba_block fold the span loop into the format handlers. (On the other hand, function call overhead will hardly matter if MapRenderbuffer means the driver gets the data into cacheable memory instead of uncached). The adjust_colors code should no longer be required, since the unpack function does the 565 to float conversion in a single pass instead of converting it (poorly) through 8888 as apparently happened in the past. Reviewed-by: Brian Paul <[email protected]>
* swrast: Skip _swrast_validate_derived in _swrast_ReadPixels().Eric Anholt2011-11-031-4/+0
| | | | | | | None of the callgraph below this uses derived state (almost nothing even dereferences the swrast context). Reviewed-by: Brian Paul <[email protected]>
* swrast: Add a readpixels fast-path based on memcpy and MapRenderbuffer.Eric Anholt2011-11-031-4/+53
| | | | | | v2: Move _mesa_get_format_bytes out of the loop. Reviewed-by: Brian Paul <[email protected]>
* mesa: Add a function for comparing gl_format to format/type.Eric Anholt2011-11-032-0/+321
| | | | | | | | | | This should be useful in making more generic fast paths in the pixel paths. v2: Add note about PACK_SWAP_BYTES, and fix up for endianness by synchronizing with memcpy_texture paths in texstore.c. Reviewed-by: Brian Paul <[email protected]>
* swrast: Switch the remaining depth readpixels to MapRenderbuffer.Eric Anholt2011-11-031-5/+17
| | | | | | | This avoids the wrapper, which should improve performance on packed depth/stencil drivers. Reviewed-by: Brian Paul <[email protected]>
* swrast: Switch the remaining depth/stencil readpixels path to MapRenderbuffer.Eric Anholt2011-11-031-30/+42
| | | | Reviewed-by: Brian Paul <[email protected]>
* swrast: MapRenderbuffer in separate depth/stencil readpixels fastpathEric Anholt2011-11-032-21/+59
| | | | | | | | | | | | This introduces two new span helper functions we'll want to use in several places as we move to MapRenderbuffer, which pull out integer depth and stencil values from a renderbuffer mapping based on the renderbuffer format. v2: Use format_unpack helper for stencil read. v3: Clean up comment after conversion to format_unpack. Reviewed-by: Brian Paul <[email protected]>
* swrast: Calculate image address/stride once for depth/stencil readpixels.Eric Anholt2011-11-031-16/+14
| | | | | | The fast and slow paths were doing these separately before. Reviewed-by: Brian Paul <[email protected]>
* swrast: Make the packed depth/stencil read fastpath use MapRenderbuffer.Eric Anholt2011-11-033-29/+94
| | | | | | | | | | | This also makes it handle 24/8 vs 8/24, fixing piglit depthstencil-default_fb-readpixels-24_8 on i965. While here, avoid incorrectly fast-pathing if packing->SwapBytes is set. v2: Move the unpack code to format_unpack.c, fix BUFFER_DEPTH typo v3: Fix signed/unsigned comparison. Reviewed-by: Brian Paul <[email protected]>
* swrast: Directly map the stencil buffer in read_stencil_pixels.Eric Anholt2011-11-033-4/+74
| | | | | | | | | | | This avoids going through the wrapper that has to rewrite the data for packed depth/stencil. This isn't done in _swrast_read_stencil_span because we don't want to map/unmap for each span. v2: Move the unpack code to format_unpack.c. v3: Fix signed/unsigned comparison. Reviewed-by: Brian Paul <[email protected]>
* radeon: Fix variable initialization typo.Vinson Lee2011-11-031-1/+1
| | | | Fixes Coverity uninitialized scalar variable defect.
* i965: Fix constant propagation into 32-bit integer MUL.Paul Berry2011-11-032-2/+15
| | | | | | | | | | | | | | | i965's MUL instruction can't take an immediate value as its first argument. So normally, if constant propagation wants to propagate a constant into the first argument of a MUL instruction, it swaps the order of the two arguments. This doesn't work for 32-bit integer (and unsigned integer) multiplies, because the MUL operation is asymmetric in that case (it multiplies 16 bits of one operand by 32 bits of the other). Fixes piglit tests {vs,fs}-multiply-const-{ivec4,uvec4}. Reviewed-by: Eric Anholt <[email protected]>
* svga: use the draw-module's sprite stage depending on FS inputsBrian Paul2011-11-031-1/+23
| | | | | | | | | | | If we're drawing sprites and the fragment shader needs both auto- generated texcoords and user-defined varying vars we need to use this fallback path. The reason is when we enable auto texcoord generation, it gets enabled for all texcoord sets. And that clobbers the user-defined varying vars. Reviewed-by: José Fonseca <[email protected]>
* svga: pass fragment shader to draw moduleBrian Paul2011-11-033-0/+12
| | | | | | | | | If we use the draw-module for wide point/line/etc drawing we'll need a fragment shader too (like we pass in the vertex shader). This fixes sprite point rendering when forcing the swtnl path. Reviewed-by: José Fonseca <[email protected]>
* svga: implement generic variable index remappingBrian Paul2011-11-039-21/+165
| | | | | | | | | | | | | | | | | | | | | | | | | The state tracker may generate shaders that use generic vs outputs / fs inputs like: DCL IN[0], GENERIC[0] DCL IN[1], GENERIC[10] DCL IN[2], GENERIC[11] This patch remaps 0, 10, 11 to small integers like 1, 2, 3 so that we stay inside the SVGA3D limit (8). The remapping is done to both the vertex shader outputs and the fragment shader inputs. The same mapping must be used for a vs/fs pair. Note that 'union svga_compile_key' is now 'struct svga_compile_key' because we needed to add the register remapping table. The change in size isn't really significant though (it's not a search key). Also, add assertions when building up SVGA3D src/dst registers to we don't try to store too large of value for the bitfield size. Reviewed-by: José Fonseca <[email protected]>
* draw: assert that we have non-null fragment shaderBrian Paul2011-11-032-0/+4
| | | | Instead of just segfaulting. Recently ran into this.
* texgetimage: add missing return on errornobled2011-11-031-0/+1
| | | | | | | | | | Missed this back in the arb_robustness branch <6b329b9274b18c50f4177eef7ee087d50ebc1525>. NOTE: This is a candidate for the 7.11 branch. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: fix texture target mix-up in NV_fragment_program parserBrian Paul2011-11-031-7/+7
| | | | | | | | | | The returned value should be a texture target index, not a bit. I spotted this from seeing a new compiler warning caused by the increase in the number of texture targets. This has been broken for a long time. Note: This is a candidate for the 7.11 branch. Reviewed-by: Ian Romanick <[email protected]>
* linker: Check that initializers for global variables matchIan Romanick2011-11-037-7/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires tracking a couple extra fields in ir_variable: * A flag to indicate that a variable had an initializer. * For non-const variables, a field to track the constant value of the variable's initializer. For variables non-constant initalizers, ir_variable::has_initializer will be true, but ir_variable::constant_initializer will be NULL. The linker can use the values of these fields to check adherence to the GLSL 4.20 rules for shared global variables: "If a shared global has multiple initializers, the initializers must all be constant expressions, and they must all have the same value. Otherwise, a link error will result. (A shared global having only one initializer does not require that initializer to be a constant expression.)" Previous to 4.20 the GLSL spec simply said that initializers must have the same value. In this case of non-constant initializers, this was impossible to determine. As a result, no vendor actually implemented that behavior. The 4.20 behavior matches the behavior of NVIDIA's shipping implementations. NOTE: This is candidate for the 7.11 branch. This patch also needs the preceding patch "glsl: Refactor generate_ARB_draw_buffers_variables to use add_builtin_constant" Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34687 Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* glsl: Refactor generate_ARB_draw_buffers_variables to use add_builtin_constantIan Romanick2011-11-031-7/+4
| | | | | | | | v2: Remove int cast based on feedback from Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* glsl: Put all bitfields in ir_variable together for better packingIan Romanick2011-11-031-8/+8
| | | | | | | | | The diff looks weird because ir_variable::depth_layout was between the last two bitfields in the structure. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* linker: Fix the indentation of a block in cross_validate_globalsIan Romanick2011-11-031-25/+32
| | | | | | | | I suspect the indentation got messed up during a code merge. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* radeon: Check an error return instead of assigning it to a dead variable.Eric Anholt2011-11-031-5/+13
| | | | | | Fixes gcc set-but-unused-variable warning. Reviewed-by: Alex Deucher <[email protected]>
* r300g: force buffer placements to GTT on big endian machinesMarek Olšák2011-11-031-0/+6
|
* state_trackers/vdpau: Add support for VC-1 decodingMaarten Lankhorst2011-11-033-2/+109
| | | | | | Add a struct with all the fields. Signed-off-by: Maarten Lankhorst <[email protected]>
* state_trackers/vdpau: Add mpeg4 part2 to PipeToProfile and ProfileToPipeMaarten Lankhorst2011-11-031-0/+8
| | | | | | So it can actually be used when someone implements it. :) Signed-off-by: Maarten Lankhorst <[email protected]>
* state_trackers/vdpau: Add support for MPEG4 Part 2Maarten Lankhorst2011-11-032-20/+105
| | | | | | Just the support patch, no decoder implements it currently. Signed-off-by: Maarten Lankhorst <[email protected]>
* state_trackers/vdpau: Test if profile is supported first before trying to ↵Maarten Lankhorst2011-11-031-0/+12
| | | | | | | | create decoder So a nicer error message is returned. Signed-off-by: Maarten Lankhorst <[email protected]>
* state_trackers/vdpau: Add num_slices to mpeg12 picture structureMaarten Lankhorst2011-11-032-0/+2
| | | | | | Bitstream parsers might need that field. Signed-off-by: Maarten Lankhorst <[email protected]>
* state_trackers/vdpau: Implement VdpGenerateCSCMatrixMaarten Lankhorst2011-11-033-2/+40
| | | | | | With the smpte240 profile, which was missing. Signed-off-by: Maarten Lankhorst <[email protected]>
* g3dvl: remove some stale variable incrementChristian König2011-11-031-1/+1
| | | | | | | | Incrementing "td" before initializing it is pointless and just leads to an uninitialized variable warning with MSVC. Signed-off-by: Christian König <[email protected]>
* r600g: more integer supportDave Airlie2011-11-032-23/+37
| | | | | | just some more trivial integer changes for r600/r700. Signed-off-by: Dave Airlie <[email protected]>
* radeon: fix some regressions in texturing code.Dave Airlie2011-11-031-6/+4
| | | | | | On a piglit run vs 7.11 this fixes 23 tests. Signed-off-by: Dave Airlie <[email protected]>
* scons: Use -static-libstdc++ on 32bits builds w/ Mingw-w64 too.José Fonseca2011-11-031-1/+1
|