summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-12-06r600g: remove useless flush mapJerome Glisse2-30/+1
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-06r600g: avoid useless shader rebuild at draw callJerome Glisse7-47/+108
Avoid rebuilding constant shader state at each draw call, factor out spi update that might change at each draw call. Best would be to update spi only when revealent states change (likely only flat shading & sprite point). Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-06r600g: build fetch shader from vertex elementsJerome Glisse11-44/+619
Vertex elements change are less frequent than draw call, those to avoid rebuilding fetch shader to often build the fetch shader along vertex elements. This also allow to move vertex buffer setup out of draw path and make update to it less frequent. Shader update can still be improved to only update SPI regs (based on some rasterizer state like flat shading or point sprite ...). Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2010-12-06mesa: Bump the number of bits in the register index.José Fonseca1-1/+1
More than 1023 temporaries were being used for a Cinebench shader before doing temporary optimization, causing the index value to wrap around to -1024.
2010-12-06st/mesa: fix mipmap generation bugBrian Paul2-1/+8
In st_finalize_texture() we were looking at the st_texture_object:: lastLevel field instead of the pipe_resource::last_level field to determine which resource to store the mipmap in. Then, in st_generate_mipmap() we need to call st_finalize_texture() to make sure the destination resource is properly allocated. These changes fix the broken piglit fbo-generatemipmap-formats test.
2010-12-06mesa/llvm: use llvm-config --cppflagsBrian Paul1-3/+2
Use --cppflags instead of --cflags so that we get the -I and -D flags we want, but not compiler options like -O3. A similar change should probably be made for autoconf.
2010-12-06gallium/util: minor formatting fixesBrian Paul1-3/+3
2010-12-06mesa: add error margin to clip mask debug/check codeBrian Paul1-2/+29
When X or Y or Z is close to W the outcome of the floating point clip test comparision may be different between the C and x86 asm paths. That's OK; don't report an error. See fd.o bug 32093
2010-12-06i965: Remove INTEL_DEBUG=glsl_force now that there's no brw_wm_glsl.cEric Anholt2-7/+0
2010-12-06i965: Nuke brw_wm_glsl.c.Eric Anholt8-1057/+10
It was only used for gen6 fragment programs (not GLSL shaders) at this point, and it was clearly unsuited to the task -- missing opcodes, corrupted texturing, and assertion failures hit various applications of all sorts. It was easier to patch up the non-glsl for remaining gen6 changes than to make brw_wm_glsl.c complete. Bug #30530
2010-12-06i965: Add support for the instruction compression bits on gen6.Eric Anholt4-47/+91
Since the 8-wide first-quarter and 16-wide first-half have the same bit encoding, we now need to track "do you want instruction compression" in the compile state.
2010-12-06i965: Align gen6 push constant size to dispatch width.Eric Anholt1-1/+2
The FS backend is fine with register level granularity. But for the brw_wm_emit.c backend, it expects pairs of regs to be used for the constants, because the whole world is pairs of regs. If an odd number got used, we went looking for interpolation in the wrong place.
2010-12-06i965: Make the sampler's implied move on gen6 be a raw move.Eric Anholt1-1/+1
We were accidentally doing a float-to-uint conversion.
2010-12-06i965: Fix up gen6 samplers for their usage by brw_wm_emit.cEric Anholt1-7/+9
We were trying to do the implied move even when we'd already manually moved the real header in place.
2010-12-06i965: Fix gen6 interpolation setup for 16-wide.Eric Anholt1-15/+26
In the SF and brw_fs.cpp fixes to set up interpolation sanely on gen6, the setup for 16-wide interpolation was left behind. This brings relative sanity to that path too.
2010-12-06i965: Don't smash a group of coordinates doing gen6 16-wide sampler headers.Eric Anholt1-0/+1
2010-12-06i965: Fix up 16-wide gen6 FB writes after various refactoring.Eric Anholt1-9/+8
2010-12-06i965: Provide delta_xy reg to gen6 non-GLSL path PINTERP.Eric Anholt1-8/+6
Fixes many assertion failures in that path.
2010-12-06i965: Move payload reg setup to compile, not lookup time.Eric Anholt9-110/+118
Payload reg setup on gen6 depends more on the dispatch width as well as the uses_depth, computes_depth, and other flags. That's something we want to decide at compile time, not at cache lookup. As a bonus, the fragment shader program cache lookup should be cheaper now that there's less to compute for the hash key.
2010-12-06mapi: Rewrite mapi_abi.py to get rid of preprocessor magic.Chia-I Wu13-395/+346
The preprocessor magic in mapi was nothing but obfuscation. Rewrite mapi_abi.py to generate real C code. This commit removes the hack added in 43121f20866bb89e8dac92bd92ec85a943704b7e.
2010-12-06egl: _eglFilterArray should not allocate.Chia-I Wu4-24/+47
Otherwise, when it is called from within a driver, the caller cannot free the returned data (on Windows).
2010-12-06i965: Fix GS state uploading on SandybridgeZhenyu Wang2-5/+14
Need to check the required primitive type for GS on Sandybridge, and when GS is disabled, the new state has to be issued too, instead of only updating URB state with no GS entry, that caused hang on Sandybridge. This fixes hang issue during conformance suite testing.
2010-12-06i965: fix for flat shading on SandybridgeXiang, Haihao1-2/+9
use constant interpolation instead of linear interpolation for attributes COL0,COL1 if GL_FLAT is used. This fixes mesa demo bounce.
2010-12-05r600g: Cleanup fetch shader resources in r600_pipe_shader_destroy().Henri Verbeet1-0/+5
2010-12-05r600g: Cleanup block bo references in r600_context_fini().Henri Verbeet1-0/+3
2010-12-05st/mesa: initialize key in st_vp_varientMarek Olšák1-0/+2
This fixes endless vertex shader recompilations in find_translated_vp if the shader contains an edge flag output. NOTE: This is a candidate for the 7.9 branch. Signed-off-by Brian Paul <brianp@vmware.com>
2010-12-05gallium/trace: check bind_vertex_sampler_states and set_vertex_sampler_viewsXavier Chantry1-0/+6
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Reviewed-by: Jakob Bornecrantz <wallbraker at gmail.com> Signed-off-by: Patrice Mandin <patmandin@gmail.com>
2010-12-05init ps->context with util_surfaces_get and do_getXavier Chantry4-14/+16
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Reviewed-by: Jakob Bornecrantz <wallbraker at gmail.com> Signed-off-by: Patrice Mandin <patmandin@gmail.com>
2010-12-05nvfx: fixes after array textures mergeXavier Chantry4-19/+35
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Patrice Mandin <patmandin@gmail.com>
2010-12-05r300g: optimize looping over atomsMarek Olšák13-119/+121
This also removes DBG_STATS (the stats can be obtained with valgrind instead).
2010-12-05r300g: cleanup winsysMarek Olšák17-640/+456
2010-12-05r300g: try and use all of vertex constant spaceDave Airlie4-47/+62
Finished up by Marek Olšák. We can set the constant space to use a different area per-call to the shader, we can avoid flushing the PVS as often as we do by spreading out the constants across the whole constant space. Signed-off-by: Marek Olšák <maraeo@gmail.com>
2010-12-05r300g: do not use the index parameter in set_constant_bufferMarek Olšák1-2/+1
It appears to be a constant buffer index (in case there are more constant buffers explicitly used by a shader), i.e. something that Gallium currently does not use. We treated it incorrectly as the offset to a constant buffer.
2010-12-04gallium/noop: Add prototype for noop_init_state_functions.Vinson Lee1-0/+2
Silences this GCC warning. noop_state.c:247: warning: no previous prototype for 'noop_init_state_functions'
2010-12-04i965: Fix compile warning about missing opcodes.Eric Anholt1-0/+5
2010-12-04i965: Update gen6 SF state on fragment program change too.Eric Anholt1-1/+3
SF state depends on what inputs there are to the fragment program, not just the outputs of the VS.
2010-12-04i965: Update gen6 WM state on compiled program change, not just FP change.Eric Anholt1-1/+3
2010-12-04intel: Add an env var override to execute for a different GPU revision.Eric Anholt4-9/+15
Sometimes I'm on the train and want to just read what's generated under INTEL_DEBUG=vs,wm for some code on another generation. Or, for the next gen enablement we'll want to dump aub files before we have the actual hardware. This will let us do that.
2010-12-04st/vega: Fix pipe blend state for various blend modes.Chia-I Wu3-60/+76
rgb_src_factor and rgb_dst_factor should be PIPE_BLENDFACTOR_ONE for VG_BLEND_SRC_IN and VG_BLEND_DST_IN respectively. VG_BLEND_SRC_OVER can be supported only when the fb has no alpha channel. VG_BLEND_DST_OVER and VG_BLEND_ADDITIVE have to be supported with a shader. Note that Porter-Duff blending rules assume premultiplied alpha.
2010-12-04st/vega: Add blend shaders for all blend modes.Chia-I Wu4-72/+145
2010-12-04st/vega: Fix VG_BLEND_MULTIPLY.Chia-I Wu1-1/+1
TEMP[1].w will be needed for OUT.w just below. Use TEMP[0] to store the intermediate value.
2010-12-04mesa: Clean up header file inclusion in texobj.h.Vinson Lee1-1/+2
2010-12-04mesa: Clean up header file inclusion in texgetimage.h.Vinson Lee1-1/+5
2010-12-04mesa: Clean up header file inclusion in texformat.h.Vinson Lee1-1/+1
2010-12-04mesa: Clean up header file inclusion in texenvprogram.h.Vinson Lee1-1/+1
2010-12-04mesa: Clean up header file inclusion in texcompress_s3tc.h.Vinson Lee1-1/+5
2010-12-04st/vega: Silence uninitialized variable warning.Vinson Lee1-0/+1
Fixes this GCC warning. api_filters.c: In function 'execute_filter': api_filters.c:184: warning: 'tex_wrap' may be used uninitialized in this function
2010-12-04mesa: Clean up header file inclusion in texcompress.h.Vinson Lee1-1/+4
2010-12-04st/vega: Blending should use premultiplied alpha.Chia-I Wu1-8/+72
Convert color values to and back from premultiplied form for blending. Finally the rendering result of the blend demo looks much closer to that of the reference implementation.
2010-12-04st/vega: Add support for per-channel alpha.Chia-I Wu4-41/+140
Drawing an image in VG_DRAW_IMAGE_STENCIL mode produces per-channel alpha for use in blending. Add a new shader stage to produce and save it in TEMP[1]. For other modes that do not need per-channel alpha, the stage does MOV TEMP[1], TEMP[0].wwww