summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* libgl-gdi: Mingw-w64 in 32bit mode matches the Mingw32's .DEF semantics.José Fonseca2011-11-031-1/+1
|
* docs: list GL_OES_EGL_image_external in 7.12 release notesChia-I Wu2011-11-031-0/+1
|
* st/mesa: add support for GL_OES_EGL_image_externalChia-I Wu2011-11-035-0/+9
| | | | | | | To pipe drivers, external textures are just 2D textures. Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* mesa: add support for GL_OES_EGL_image_externalChia-I Wu2011-11-0316-17/+106
| | | | | | | | | This is an OpenGL ES specific extension. External textures are textures that may be sampled from, but not be updated (no glTexSubImage* and etc.). The image data are taken from an EGLImage. Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* mesa: clean up validate_texture_wrap_modeChia-I Wu2011-11-031-15/+27
| | | | | | | | GL_TEXTURE_RECTANGLE_NV (and soon GL_TEXTURE_EXTERNAL_OES) is special. Handle it in its own if-block. There should be no functional change. Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* mesa: fix a logic error in glFramebufferTexture2DChia-I Wu2011-11-031-1/+1
| | | | | | | Unrecognized texture target should give an error. Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* glsl: add support for GL_OES_EGL_image_externalChia-I Wu2011-11-0315-1/+70
| | | | | | | | | | This extension introduces a new sampler type: samplerExternalOES. texture2D (and texture2DProj) can be used to do a texture look up in an external texture. Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add GL_OES_EGL_image_external to the extension listChia-I Wu2011-11-032-0/+2
| | | | | Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* mesa: add missing defines for GL_OES_EGL_image_externalChia-I Wu2011-11-031-0/+8
| | | | | Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* mesa, i965: prepare for more than 8 texture targetsChia-I Wu2011-11-034-4/+4
| | | | | | | | | 3-bit fields are used store texture target in several places. That will fail when TEXTURE_EXTERNAL_INDEX, which happends to be the 9th texture target, is added. Make them 4-bit fields. Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* glapi: regenerate filesChia-I Wu2011-11-031-1178/+1190
|
* glapi: add entry points for OES_EGL_image_externalChia-I Wu2011-11-031-0/+8
| | | | | | | Only enums actually. Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* GLES: upgrade glext.h to revision 13240Chia-I Wu2011-11-031-2/+74
| | | | | Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* swrast: simplify the condition test for _swrast_choose_texture_sample_funcYuanhan Liu2011-11-031-13/+9
| | | | | | | | | remove another long if condition test. I don't feel a strong need of this patch. But for it make the code a little simpler(I do think so), I send it out. Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: fix the low limit of width and height for glRenderbufferStorageYuanhan Liu2011-11-031-2/+2
| | | | | | | | | | | | glRenderbufferStorage man page says: GL_INVALID_VALUE is generated if either of width or height is negative, or greater than the value of GL_MAX_RENDERBUFFER_SIZE. NOTE: this is a candidate for the 7.11 branch Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: fix inital value for new renderbufferYuanhan Liu2011-11-031-1/+1
| | | | | | | | | | | | | EXT_framebuffer_object bspec says: Get Value Type Get Command Initial Value ------------------------------- ------ ----------- ----------- RENDERBUFFER_INTERNAL_FORMAT_EXT Z+ GetRenderbufferParameterivEXT RGBA NOTE: this is a candidate for the 7.11 branch Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: complete the GL_TEXTURE_SWIZZLE* setupYuanhan Liu2011-11-031-0/+27
| | | | | | | | | | | | | | | | | | | | | The ARB_texture_swizzle spec says: The error INVALID_OPERATION is generated if TexParameteri, TexParameterf, TexParameteriv, or TexParameterfv, parameter <pname> is TEXTURE_SWIZZLE_R, TEXTURE_SWIZZLE_G, TEXTURE_SWIZZLE_B, or TEXTURE_SWIZZLE_A, and <param> is not RED, GREEN, BLUE, ALPHA, ZERO, or ONE. The error INVALID_OPERATION is generated if TexParameteriv, or TexParameterfv, parameter <pname> TEXTURE_SWIZZLE_RGBA, and the four consecutive values pointed to by <param> are not all RED, GREEN, BLUE, ALPHA, ZERO, or ONE. So, the GL_TEXTURE_SWIZZLE* pname is legal for glTexParameterf(v) NOTE: this is a candidate for the 7.11 branch Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>