summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* radeon/llvm: Don't use lp_build_swizzle_aos() for swizzlesTom Stellard2012-07-121-8/+13
| | | | | | | This function assumes that lp_build_context::type is a vector type, which is not true for r600 or radeonsi. This fixes an assertion failure using glamor 2D accel.
* radeonsi: Dump TGSI code prior to doing TGSI->LLVM conversion.Tom Stellard2012-07-121-1/+6
| | | | | This way if the conversion fails, we know what the TGSI shader looks like.
* i965: Delete previous workaround for textureGrad with shadow samplers.Kenneth Graunke2012-07-124-75/+5
| | | | | | | | | | | | | | | It had many problems: - The shadow comparison was done post-filtering. - It required state-dependent recompiles whenever the comparison function changed. - It didn't even work: many cases hit assertion failures. - I never implemented it for the VS. The new lowering pass which converts textureGrad to textureLod by computing the LOD value works much better. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Add a lowering pass to convert TXD to TXL by computing the LOD.Kenneth Graunke2012-07-124-0/+157
| | | | | | | | | | | | | | | | | | Intel hardware doesn't natively support textureGrad with shadow comparisons. So we need to generate code to handle it somehow. Based on the equations of page 205 of the OpenGL 3.0 specification, it's possible to compute the LOD value that would be selected given the gradient values. Then, we can simply convert the TXD to a TXL. Currently, this passes 34/46 of oglconform's shadow-grad subtests; four cubemap tests are regressed. We should investigate this in the future. v2: Apply abs() to the scalar case (thanks to Eric). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl/ir_builder: Add a new swizzle_for_size() function.Kenneth Graunke2012-07-122-0/+20
| | | | | | | | This swizzles away unwanted components, while preserving the order of the ones that remain. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl/ir_builder: Add a generic constructor for unary expressions.Kenneth Graunke2012-07-122-0/+9
| | | | | | | | | I needed to compute logs and square roots in a patch I was working on, and wanted to use the convenient interface. We already have a similar constructor for binops; adding one for unops seems reasonable. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Initialize coordinate to NULL in ir_texture constructor.Kenneth Graunke2012-07-121-1/+2
| | | | | | | | | | | I ran into this while trying to create a TXS query, which doesn't have a coordinate. Since it didn't get initialized to NULL, a bunch of visitors tried to access it and crashed. Most of the time, this won't be a problem, but it's just a good idea. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/xorg: Fix build failure due to symbol clash.José Fonseca2012-07-121-0/+3
|
* docs: update relnotes-8.1 and GL3 statusMarek Olšák2012-07-122-2/+4
|
* st/mesa: expose new transform feedback extensionsMarek Olšák2012-07-121-0/+6
|
* mesa: add ARB_transform_feedback_instanced extension enable flagMarek Olšák2012-07-122-0/+2
| | | | Acked-by: Ian Romanick <[email protected]>
* mesa: implement new DrawTransformFeedback functionsMarek Olšák2012-07-125-12/+130
| | | | Acked-by: Ian Romanick <[email protected]>
* mesa: implement display list support for new DrawTransformFeedback functionsMarek Olšák2012-07-122-0/+85
| | | | Acked-by: Ian Romanick <[email protected]>
* mesa: implement display list support for indexed query functionsMarek Olšák2012-07-121-2/+47
| | | | Acked-by: Ian Romanick <[email protected]>
* mesa: implement indexed query functions from ARB_transform_feedback3Marek Olšák2012-07-121-15/+67
| | | | Acked-by: Ian Romanick <[email protected]>
* mesa: implement glGet queries and error handling for ARB_transform_feedback3Marek Olšák2012-07-124-0/+43
| | | | Acked-by: Ian Romanick <[email protected]>
* glsl: implement ARB_transform_feedback3 in the linkerMarek Olšák2012-07-123-15/+106
| | | | Acked-by: Ian Romanick <[email protected]>
* glapi: add ARB_transform_feedback_instancedMarek Olšák2012-07-121-1/+18
| | | | Acked-by: Ian Romanick <[email protected]>
* glapi: add ARB_transform_feedback3Marek Olšák2012-07-121-1/+30
| | | | Acked-by: Ian Romanick <[email protected]>
* r600g: fix uploading non-zero mipmap levels of depth texturesMarek Olšák2012-07-121-2/+3
| | | | | | This fixes piglit/depth-level-clamp. Reviewed-by: Alex Deucher <[email protected]>
* r600g: don't flush depth textures set as colorbuffersMarek Olšák2012-07-121-18/+0
| | | | | | | | The only case a depth buffer can be set as a color buffer is when flushing. That wasn't always the case, but now this code isn't required anymore. Reviewed-by: Alex Deucher <[email protected]>
* r600g: don't set dirty_db_mask for a flushed depth textureMarek Olšák2012-07-121-2/+0
| | | | | | A flush depth texture is never set as a depth buffer and never flushed. Reviewed-by: Alex Deucher <[email protected]>
* r600g: flush depth textures bound to vertex shadersMarek Olšák2012-07-123-16/+17
| | | | | | This was missing/broken. There are also minor code cleanups. Reviewed-by: Alex Deucher <[email protected]>
* r600g: do fine-grained depth texture flushingMarek Olšák2012-07-125-34/+69
| | | | | | | | - maintain a mask of which mipmap levels are dirty (instead of one big flag) - only flush what was requested at a given point and not the whole resource (most often only one level and one layer has to be flushed) Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove is_flush from DSA stateMarek Olšák2012-07-124-14/+16
| | | | | | | we can just update the state when decompressing, there's no need to add additional info into the DSA state Reviewed-by: Alex Deucher <[email protected]>
* r600g: set DISABLE in CB_COLOR_CONTROL if colormask is 0Marek Olšák2012-07-124-3/+17
| | | | | | this will be useful for in-place DB decompression, otherwise should be harmless Reviewed-by: Alex Deucher <[email protected]>
* r600g: move CB_SHADER_MASK setup into cb_misc_stateMarek Olšák2012-07-126-28/+32
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: move MULTIWRITE setup into cb_misc_state for r6xx-r7xxMarek Olšák2012-07-124-21/+20
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: move CB_TARGET_MASK setup into new cb_misc_stateMarek Olšák2012-07-128-13/+51
| | | | | | | | | | to remove some overhead from draw_vbo. This is a derived state. BTW, I've got no idea how compute interacts with 3D here, but it should use cb_misc_state, so that 3D and compute don't conflict. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* st/mesa: implement accelerated stencil blitting using shader stencil exportMarek Olšák2012-07-128-50/+217
| | | | Reviewed-by: Alex Deucher <[email protected]>
* st/mesa: set colormask to zero when blitting depthMarek Olšák2012-07-122-6/+10
| | | | Reviewed-by: Alex Deucher <[email protected]>
* gallium/u_blit: remove useless memset callsMarek Olšák2012-07-121-6/+0
| | | | | | the structure is calloc'd. Reviewed-by: Alex Deucher <[email protected]>
* gallium/u_blit: drop not-very-useful wrapper around util_blit_pixels_writemaskMarek Olšák2012-07-126-67/+34
| | | | | | just rename it to util_blit_pixels Reviewed-by: Alex Deucher <[email protected]>
* gallium/u_blit: don't do two copies for non-2D texturesMarek Olšák2012-07-121-33/+39
| | | | | | | | | Because u_blit couldn't sample a 1D, 3D, CUBE and ARRAY texture, we created a 2D texture holding a copy of one slice of the source texture (even for 1D). Let's just do it right. Reviewed-by: Alex Deucher <[email protected]>
* gallium/util: move pipe_tex_to_tgsi_tex helper function into u_inlinesMarek Olšák2012-07-122-30/+30
| | | | Reviewed-by: Alex Deucher <[email protected]>
* gallium/u_blitter: accelerate stencil-only copyingMarek Olšák2012-07-123-1/+79
| | | | | | This doesn't seem to be used by anything yet, but better safe than sorry. Reviewed-by: Alex Deucher <[email protected]>
* gallium/u_blitter: accelerate depth-stencil copying using shader stencil exportMarek Olšák2012-07-124-12/+147
| | | | | | This fixes stencil buffer write transfers on r600g. Reviewed-by: Alex Deucher <[email protected]>
* gallium: add util_format_stencil_only helper functionMarek Olšák2012-07-122-21/+31
| | | | | | used for stencil sampler views. Reviewed-by: Alex Deucher <[email protected]>
* gallium/u_blitter: minify depth0 when initializing last_layerMarek Olšák2012-07-121-1/+1
| | | | Reviewed-by: Alex Deucher <[email protected]>
* gallium/u_gen_mipmap: accelerate depth texture mipmap generationMarek Olšák2012-07-121-26/+58
| | | | Reviewed-by: Alex Deucher <[email protected]>
* mesa: remove assertions that do not allow compressed 2D_ARRAY texturesMarek Olšák2012-07-121-4/+2
| | | | | | NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Alex Deucher <[email protected]>
* i965/msaa: Enable CMS layout on Gen7 for the formats that support it.Paul Berry2012-07-111-1/+18
| | | | Reviewed-by: Chad Versace <[email protected]>
* i965/msaa: Add CMS support to blorp.Paul Berry2012-07-111-2/+43
| | | | | | | | | | | | | | | | | | This patch updates the blorp engine to properly handle the case where the surface being textured from uses Gen7's CMS MSAA layout. The following changes were necessary: - Before reading color values from the surface, we need to read from the MCS buffer using the ld_mcs sampler message. This is done by the mcs_fetch() function, and the result is stored in the mcs_data register. This only needs to be done once per pixel, since the MCS value is shared between all samples belonging to a pixel. - When reading color values from the surface, we need to use the ld2dms sampler message instead of the ld2dss message, and we need to provide the value read from the MCS buffer as an argument. Reviewed-by: Chad Versace <[email protected]>
* i965/msaa: Add CMS-related sampler messages to brw_defines.h.Paul Berry2012-07-111-0/+2
| | | | Reviewed-by: Chad Versace <[email protected]>
* i965/msaa: Set SURFACE_STATE properly when CMS MSAA is in use.Paul Berry2012-07-113-0/+54
| | | | | | | | | When a buffer using Gen7's CMS MSAA layout is bound to a texture or a render target, the SURFACE_STATE structure needs to point to the MCS buffer and to indicate its pitch. This patch updates the functions that emit SURFACE_STATE to handle CMS layout properly. Reviewed-by: Chad Versace <[email protected]>
* i965/msaa: Add CMS MSAA settings to brw_structs.h.Paul Berry2012-07-111-2/+20
| | | | | | | Previously the DWORD used to control the CMS MSAA layout was just a pad value, because we didn't use it. Reviewed-by: Chad Versace <[email protected]>
* i965/msaa: Allocate MCS buffer when CMS MSAA is in use.Paul Berry2012-07-113-0/+69
| | | | | | | | | | | To implement Gen7's CMS MSAA layout, we need an extra buffer, the MCS (Multisample Control Surface) buffer. This patch introduces code for allocating and deallocating the buffer, and storing a pointer to it in the intel_mipmap_tree struct. No functional change, since the CMS layout is not enabled yet. Reviewed-by: Chad Versace <[email protected]>
* i965/msaa: Add an enum to describe MSAA layout.Paul Berry2012-07-1110-130/+229
| | | | | | | | | | | | | | | | | | | | | | | | From the Ivy Bridge PRM, Vol 1 Part 1, p112: There are three types of multisampled surface layouts designated as follows: - IMS Interleaved Multisampled Surface - CMS Compressed Mulitsampled Surface - UMS Uncompressed Multisampled Surface Previously, the i965 driver only used IMS and UMS formats, and distinguished beetween them using the boolean intel_mipmap_tree::msaa_is_interleaved. To facilitate adding support for the CMS format, this patch replaces that boolean (and other booleans derived from it) with an enum INTEL_MSAA_LAYOUT_{IMS,CMS,UMS}. It also updates the terminology used in comments throughout the driver to match the IMS/CMS/UMS terminology used in the PRM. CMS layout is not yet used. The enum has a fourth possible value, INTEL_MSAA_LAYOUT_NONE, which is used for non-multisampled surfaces. Reviewed-by: Chad Versace <[email protected]>
* i965/msaa: Move {rt,tex}_interleaved into blorp program key.Paul Berry2012-07-112-16/+30
| | | | | | | | | | | | | | | | On Gen6, MSAA buffers always use an interleaved layout and non-MSAA buffers always use a non-interleaved layout, so it is not strictly necessary to keep track of the layout of the texture and render target surfaces in the blorp program key. However, it is cleaner to do so, since (a) it makes the blorp compiler less dependent on implicit knowledge about how the GPU pipeline is configured, and (b) it paves the way for implementing compressed multisampled surfaces in Gen7. This patch won't cause any redundant compiles, because the layout of the texture and render target surfaces depends on other parameters that are already in the blorp program key. Reviewed-by: Chad Versace <[email protected]>
* mapi: Move GL_NV_draw_buffers extension to es_EXT.xmlKristian Høgsberg2012-07-112-63/+63
| | | | | | | | | | | | We don't generate public entrypoints for GLES extensions, so move the GL_NV_draw_buffers definition from ARB_draw_buffers.xml to es_EXT.xml. When the extension is defined in ARB_draw_buffers.xml, we end up with a public entry point for it, but no prototype, which gives an error when compiled with --disable-asm and --disable-shared-glapi. Instead, just move the GLES extension to es_EXT.xml so this doesn't happen. Signed-off-by: Kristian Høgsberg <[email protected]>