summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i965: Move loop over texture units into brw_populate_sampler_prog_key.Kenneth Graunke2012-07-123-82/+81
| | | | | | | | | | | The whole reason I avoided this was because it might operate on a brw_vertex_program or a brw_fragment_program. However, that isn't a problem: all we need is the gl_program base type. This avoids awkwardly passing the loop counter 'i' as a parameter, simplifies both callers, and also plumbs prog in place for future use. Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Always emit alpha when nr_color_buffers == 0.Kenneth Graunke2012-07-123-11/+6
| | | | | | | | | | | | | | | If alpha-testing is enabled, we need to send alpha down the pipeline even if nr_color_buffers == 0. However, tracking whether alpha-testing is enabled in the WM program key is expensive: it causes us to compile multiple specializations of the same shader, using program cache space. This patch removes the check for alpha-testing, and simply emits alpha whenever nr_color_buffers == 0. We believe this will also be necessary for alpha-to-coverage, and it should add minimal overhead to an uncommon case. Saving the recompiles should more than make up the difference. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Use the blitter in intel_bufferobj_subdata for busy BOs on Gen6+.Kenneth Graunke2012-07-121-16/+10
| | | | | | | | | | Previously we only did this pre-Gen6, and used pwrite on Gen6+. In one workload, this cuts significant amount of overhead. v2: Simplify the function based on Eric's suggestions. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* gallivm: Use %.9g to print floats.José Fonseca2012-07-121-3/+6
| | | | | | So that we can see them in their full denormalized glory. Reviewed-by: Roland Scheidegger <[email protected]>
* scons: Remove -ffast-math.José Fonseca2012-07-121-2/+0
| | | | | | | | | We rely on proper IEEE 754 behavior in too many places for this. See also commit 2fdbbeca43e7b57095774e4228e6eea75a180fab with equivalent change for autoconf. Reviewed-by: Roland Scheidegger <[email protected]>
* scons: Also require recent XCB.José Fonseca2012-07-122-1/+4
| | | | And don't trip when it's not found -- simply skip building src/glx.
* mesa: Require current libxcb.Eric Anholt2012-07-125-53/+2
| | | | | | | | | | Without that, people with buggy apps that looked at just the server string for GLX_ARB_create_context would call this function that just threw an error when you tried to make a context. Google shows plenty of complaints about this. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* 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]>