summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i965: Add forgotten bitcast operations in brw_fs_channel_expressions.Kenneth Graunke2012-06-071-0/+4
| | | | Signed-off-by: Kenneth Graunke <[email protected]>
* i965/blorp: allow all buffer formats provided src and dst match.Paul Berry2012-06-071-25/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, blits using the "blorp" mechanism only worked for 8-bit RGBA color buffers, 24-bit depth buffers, and 8 bit stencil buffers. This was not enough, because the blorp mechanism must be used for blitting whenever MSAA is in use. This patch allows all formats to be used, provided the source and destination formats match. So far I have confirmed that the following formats work properly with MSAA: - GL_RGB - GL_RGBA - GL_ALPHA - GL_ALPHA4 - GL_ALPHA8 - GL_R3_G3_B2 - GL_RGB4 - GL_RGB5 - GL_RGB8 - GL_RGB10 - GL_RGB12 - GL_RGB16 - GL_RGBA2 - GL_RGBA4 - GL_RGB5_A1 - GL_RGBA8 - GL_RGB10_A2 - GL_RGBA12 - GL_RGBA16 Fixes piglit tests "EXT_framebuffer_multisample/formats {2,4}" on Sandy Bridge and Ivy Bridge. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/blorp: Implement logic for additional buffer formats.Paul Berry2012-06-073-7/+37
| | | | | | | | | | | | | Previously the blorp engine only supported RGBA8 color buffers and 24-bit depth buffers. This patch adds support for any color buffer format that is supported as a render target, and for 16-bit and 32-bit depth buffers. This required threading the brw_context struct through into brw_blorp_surface_info::set() so that it can consult the brw->render_target_format array. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/blorp: De-virtualize brw_blorp_{mip,surface}_info::set() function.Paul Berry2012-06-071-4/+4
| | | | | | | | | | Even though brw_blorp_surface_info is derived from brw_blorp_mip_info, this function doesn't need to be virtual, because it is never accessed through a base class pointer. Making the function non-virtual will allow it to take additional parameters in the brw_blorp_surface_info case. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/blorp: Refactor surface format determination.Paul Berry2012-06-074-10/+10
| | | | | | | | | | | This patch moves the responsibility for deciding on the format of the source and destination surfaces from the gen{6,7}_blorp_emit_surface_state() functions to brw_blorp_surface_info::set(), which is shared between Gen6 and Gen7. This will make it possible to add support for more surface formats without code duplication. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Enable the GL_ARB_shader_bit_encode extension.Kenneth Graunke2012-06-073-0/+25
| | | | Signed-off-by: Kenneth Graunke <[email protected]>
* st/mesa: Finally activate the ARB_shader_bit_encoding extension.Olivier Galibert2012-06-071-0/+4
| | | | | Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Bitwise conversion operator support in the software renderers.Olivier Galibert2012-06-072-0/+11
| | | | | | | | | | | | | TGSI doesn't need an opcode, since registers are untyped (but beware once doubles come into the scene). Mesa IR doesn't handle native integers, so trying to handle them there is worthless, the case entries are only added for warning reasons. It was only tested with softpipe, since llvmpipe doesn't support glsl 1.3 yet. Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Bitwise conversion operator support in ir_constant_expression.Olivier Galibert2012-06-071-0/+47
| | | | | | | | | A "test_out = floatBitsToUint(-1.0);" fired through the GLSL compiler gives a correct "(assign (x) (var_ref test_out) (constant uint (3212836864)))" Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Bitwise conversion operator support in ir_validate.Olivier Galibert2012-06-071-0/+16
| | | | | Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Bitwise conversion operator support in ir_expression.Olivier Galibert2012-06-071-0/+4
| | | | | Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: New unary opcodes for ARB_shader_bit_encoding support.Olivier Galibert2012-06-077-11/+125
| | | | | | | The opcodes are bitcast_f2u, bitcast_f2i, bitcast_i2f and bitcast_u2f. Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Scaffolding for ARB_shader_bit_encoding.Olivier Galibert2012-06-078-0/+11
| | | | | | | | That adds support for activating the extension. It doesn't actually *do* anything yet, of course. Signed-off-by: Olivier Galibert <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Return 8 bits for GL_TEXTURE_RED_SIZE on RGTC formats.Kenneth Graunke2012-06-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | From the issues section of the GL_ARB_texture_compression_rgtc extension: 15) What should glGetTexLevelParameter return for GL_TEXTURE_GREEN_SIZE and GL_TEXTURE_BLUE_SIZE for the RGTC1 formats? What should glGetTexLevelParameter return for GL_TEXTURE_BLUE_SIZE for the RGTC2 formats? RESOLVED: Zero bits. These formats always return 0.0 for these respective components and have no bits devoted to these components. Returning 8 bits for red size of RGTC1 and the red and green sizes of RGTC2 makes sense because that's the maximum potential precision for the uncompressed texels. Thus, we need to return 8 bits for GL_TEXTURE_RED_SIZE on all RGTC formats and 8 bits for GL_TEXTURE_GREEN_SIZE on RGTC2 formats. BLUE should be 0. Fixes oglconform/rgtc/advanced.texture_fetch.tex_param. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl: Hook up loop_variable_state destructor to plug a memory leak.Kenneth Graunke2012-06-071-0/+17
| | | | | | | | | | | | | While ~loop_state() is already freeing the loop_variable_state objects via ralloc_free(this->mem_ctx), the ~loop_variable_state() destructor was never getting called, so the hash table inside loop_variable_state was never getting destroyed. Fixes a memory leak in any shader with loops. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]>
* radeon/llvm: Emulate RECIP_UINT instruction on CaymanTom Stellard2012-06-062-4/+13
|
* radeon/llvm: Remove some duplicate code in the R600 CodeEmitterTom Stellard2012-06-061-9/+3
|
* radeon/llvm: Fix MULLO* instructions on CaymanTom Stellard2012-06-064-14/+53
| | | | | On Cayman, the MULLO* instructions must fill all slots in an instruction group.
* r600g: Compute support for CaymanTom Stellard2012-06-065-66/+95
|
* xorg: port to new compat API.Dave Airlie2012-06-068-63/+162
| | | | Signed-off-by: Dave Airlie <[email protected]>
* mesa: consolidate internal glCompressedTexSubImage1/2/3D codeBrian Paul2012-06-067-138/+42
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glCompressedTexImage1/2/3D codeBrian Paul2012-06-067-140/+44
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glCopyTexSubImage1/2/3D codeBrian Paul2012-06-0610-220/+62
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glTexSubImage1/2/3D codeBrian Paul2012-06-0610-195/+61
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: consolidate internal glTexImage1/2/3D codeBrian Paul2012-06-0610-343/+73
| | | | | | | The functions for handling 1D, 2D and 3D texture images were nearly identical. This folds them all together. Reviewed-by: Kenneth Graunke <[email protected]>
* translate_test: add support for half floatsBrian Paul2012-06-061-0/+8
| | | | | | Fixes assertion reported in https://bugs.freedesktop.org/show_bug.cgi?id=44519 but there's still failing cases.
* docs: remove documentation of old Makefile systemBrian Paul2012-06-061-116/+5
| | | | It's going away in the near future.
* radeon/llvm: Remove obselete hooks for the ConvertToISA passTom Stellard2012-06-066-87/+1
| | | | | | We can't remove this pass yet, because we need it to convert AMDIL registers in BRANCH* instructions, but we don't need it for instruction conversion any more.
* radeon/llvm: Remove AMDIL MOVE* instructionsTom Stellard2012-06-065-20/+2
|
* radeon/llvm: Add isMov() to AMDILInstrInfoTom Stellard2012-06-066-11/+34
| | | | | This enables the CFGStructurizer to work without the AMDIL::MOV* instructions.
* radeon/llvm: Remove deadcode from the AMDILISelLowering classTom Stellard2012-06-062-203/+0
|
* radeon/llvm: Don't lower RETURN to S_ENDPGM on SITom Stellard2012-06-062-1/+4
| | | | | Instead create an S_ENDPGM instruction in the CodeEmitter and emit it after all the other instructions.
* radeon/llvm: Remove AMDIL VCREATE* instructionsTom Stellard2012-06-068-97/+12
| | | | This obsoletes the AMDGPULowerInstruction pass.
* radeon/llvm: Remove AMDIL LOADCONST* instructionsTom Stellard2012-06-0613-322/+33
| | | | This obsoletes the R600LowerInstruction and SIPropagateImmReads passes.
* nouveau: fix scratch buffer leakMarcin Slusarz2012-06-054-3/+15
| | | | ...and create common function for destroying nouveau_context
* nv50: fix nv50_stream_output_state leakMarcin Slusarz2012-06-051-0/+3
|
* nv50: fix symbol table memory leakMarcin Slusarz2012-06-051-0/+3
|
* i965/fs: Fix user-defined FS outputs with less than four components.Kenneth Graunke2012-06-052-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenGL allows you to declare user-defined fragment shader outputs with less than four components: out ivec2 color; This makes sense if you're rendering to an RG format render target. Previously, we assumed that all color outputs had four components (like the built-in gl_FragColor/gl_FragData variables). This caused us to call emit_color_write for invalid indices, incrementing the output virtual GRF's reg_offset beyond the size of the register. This caused cascading failures: split_virtual_grfs would allocate new size-1 registers based on the virtual GRF size, but then proceed to rewrite the out-of-bounds accesses assuming that it had allocated enough new (contiguously numbered) registers. This resulted in instructions that accessed size-1 GRFs which register numbers beyond virtual_grf_next (i.e. registers that were never allocated). Finally, this manifested as live variable analysis and instruction scheduling accessing their temporary array with an out of bounds index (as they're all sized based on virtual_grf_next), and the program would segfault. It looks like the hardware's Render Target Write message requires you to send four components, even for RT formats such as RG or RGB. This patch continues to use all four MRFs, but doesn't bother to fill any data for the last few, which should be unused. +2 oglconforms. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Fix texelFetchOffset() on pre-Gen7.Kenneth Graunke2012-06-051-2/+2
| | | | | | | | | | | Commit 4650aea7a536ddce120576fadb91845076e8e37a fixed texelFetchOffset() on Ivybridge, but didn't update the Ironlake/Sandybridge code. +18 piglits on Sandybridge. NOTE: This and 4650aea7a536ddce are both candidates for stable branches. Signed-off-by: Kenneth Graunke <[email protected]>
* i965/fs: Fix texelFetchOffset() on pre-Gen7.Kenneth Graunke2012-06-051-12/+28
| | | | | | | | | | | Commit f41ecade7b458c02d504158b522acb2231585040 fixed texelFetchOffset() on Ivybridge, but didn't update the Ironlake/Sandybridge code. +15 piglits on Sandybridge. NOTE: This and f41ecade7b458 are both candidates for stable branches. Signed-off-by: Kenneth Graunke <[email protected]>
* meta: Fix GL_RENDERBUFFER binding in decompress_texture_image().Kenneth Graunke2012-06-051-0/+4
| | | | | | | | | | | | | This isn't saved/restored by _mesa_meta_begin, so we need to do it manually (like we do for the read/draw framebuffers). Additionally, we neglected to re-bind before the glRenderbufferStorage call. +13 oglconforms. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Unbind ARB_transform_feedback2 binding points on Delete too.Kenneth Graunke2012-06-051-1/+7
| | | | | | | | | | | | DeleteBuffer needs to unbind from these binding points as well, based on the same rationale as the previous patch. +51 oglconforms (together with the last patch). NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Support BindBuffer{Base,Offset,Range} with a buffer of 0.Kenneth Graunke2012-06-051-3/+18
| | | | | | | | | | | | | _mesa_lookup_bufferobj returns NULL for 0, which caused us to say "there's no such buffer object" and raise an error, rather than correctly binding the shared NullBufferObj. Now you can unbind your buffers. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Unbind ARB_copy_buffer and transform feedback buffers on delete.Kenneth Graunke2012-06-051-0/+13
| | | | | | | | | | | | | | | | | According to the GL 3.1 spec, section 2.9 ("Buffer Objects"): "If a buffer object is deleted while it is bound, all bindings to that object in the current context (i.e. in the thread that called DeleteBuffers) are reset to zero." The code already checked for a number of cases, but neglected these newer binding points. +21 oglconforms. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl/builtins: Fix textureGrad() for Array samplers.Kenneth Graunke2012-06-051-3/+3
| | | | | | | | | | | | We were incorrectly assuming that the coordinate's dimensionality is equal to the gradient's dimensionality. For array types, the coordinate has one more component. Fixes 12 subcases of oglconform's glsl-bif-tex-grad test. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <[email protected]>
* configure.ac: Fail if egl x11 platform dependencies are not availableKristian Høgsberg2012-06-051-28/+39
| | | | | | | | | | Currently, if you pass --with-egl-platforms=x11 but xcb-dri2 isn't available we just silently fail and disables building the EGL DRI2 driver. This commit cleans up the EGL platfrom checking and fails if a selected platform can't find its required dependencies. Reviewed-by: Eric Anholt <[email protected]>
* r600g: add new Trinity PCI idsAlex Deucher2012-06-051-0/+17
| | | | Signed-off-by: Alex Deucher <[email protected]>
* r600g: add new Sumo, Palm, BTC pci idsAlex Deucher2012-06-051-0/+5
| | | | | | Note this is a candidate for the stable branch. Signed-off-by: Alex Deucher <[email protected]>
* radeonsi: add new SI pci idsAlex Deucher2012-06-051-5/+6
| | | | Signed-off-by: Alex Deucher <[email protected]>
* Fix .gitignore for ralloc-testPaul Berry2012-06-041-1/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>