summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* llvmpipe: support pipe_resource-based constant buffersBrian Paul2012-12-117-34/+48
| | | | | | | | | | | | | | | | Before this we only supported user-based constant buffers. First, we basically plumb pipe_constant_buffer objects through llvmpipe rather than pipe_resource objects. Second, update llvmpipe_set_constant_buffer() and try_update_scene_state() so they understand both resource- and user-based constant buffers. The problem with user constant buffers is the potential for use-after-free, as seen in some WebGL tests. The next patch will flip the switch for resource-based const buffers. Reviewed-by: Jose Fonseca <[email protected]>
* util: add util_copy_constant_buffer() helper functionBrian Paul2012-12-111-0/+20
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* i965/fs: Improve performance of shaders that start out with a discard.Eric Anholt2012-12-116-7/+148
| | | | | | | | | | | | | | I had tried this in the past, but ran into trouble with applications that sample from undiscarded pixels in the same subspan. To fix that issue, only jump to the end for an entire subspan at a time. Improves GLbenchmark 2.7 (1024x768) performance by 7.9 +/- 1.5% (n=8). v2: Drop the br variable in the jump instruction -- if I ever do jumps pre-gen6, it'll be a different code block anyway since we don't have HALT until gen6. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Rewrite discards to use a flag subreg to track discarded pixels.Eric Anholt2012-12-118-73/+46
| | | | | | | | | This makes much more sense on gen6+, and will also prove useful for early exit of shaders on discard. v2: fix up a stale comment from before converting gen4-5. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Add an instruction flag for choosing the flag subregister.Eric Anholt2012-12-116-13/+42
| | | | | | | | We're going to redo discard handling to track discards in the other flag subregister, saving instructions in the discard and allowing predicated jumps out to the end of the shader. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Let brw_flag_reg() choose the flag reg and subreg.Eric Anholt2012-12-114-7/+7
| | | | | | We're about to start using the f0.1 subregister. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Print the flag reg updated by conditional modifiers.Eric Anholt2012-12-111-1/+15
| | | | | | | This makes our output more consistent with other disasm tools, and will be necessary when we start using f0.1. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add the new flag_reg_nr instruction field from IVB.Eric Anholt2012-12-112-5/+9
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Correct the name and usage of the flag subregister number field.Eric Anholt2012-12-114-15/+15
| | | | | | | We've been calling it a register number, it's actually the subregister, and things will get confusing once we start using it if it isn't fixed. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Remove bogus flag_reg_nr field from bits3.Eric Anholt2012-12-111-4/+2
| | | | | | | There's a flag subreg nr field in bits2 next to src0.vertstride, but there shouldn't be anything in bits3 next to src1.vertstride. Reviewed-by: Kenneth Graunke <[email protected]>
* st/egl/drm: only unref the udev device if neededTobias Droste2012-12-111-4/+5
| | | | | | | | | | | Fixes compiler warning: drm/native_drm.c: In function ‘native_create_display’: drm/native_drm.c:180:21: warning: ‘device’ may be used uninitialized in this function [-Wmaybe-uninitialized] drm/native_drm.c:157:24: note: ‘device’ was declared here Signed-off-by: Tobias Droste <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* softpipe: Use os_time_get_nano() everywhere.José Fonseca2012-12-112-5/+5
|
* clover: Install CL headers.Johannes Obermayr2012-12-101-0/+10
| | | | Note: This is a candidate for the stable branches.
* gallivm: Lower TGSI_OPCODE_MUL to fmul by defaultTom Stellard2012-12-101-2/+3
| | | | | | | This fixes a number of crashes on r600g due to the fact that lp_build_mul assumes vector types when optimizing mul to bit shifts. This bug was uncovered by 0ad1fefd6951aa47ab58a41dc9ee73083cbcf85c
* llvmpipe: fix txq for 1d/2d arrays. (v3)Dave Airlie2012-12-111-2/+15
| | | | | | | | | | | | | | | | | Noticed would fail, we were doing two things wrong a) 1d arrays require the layers in height b) minifying the layers field. v2: don't change height code, fixup completely inside txq as suggested by Roland. v3: just add minify before texture array size v1: Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* llvmpipe: increase texture target width to reflect increaseDave Airlie2012-12-111-1/+1
| | | | | | | Now that we've gone over 7. Reviewed-by: Jose Fonseca <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa syncobj: don't store a pointer to the set_entryJordan Justen2012-12-102-5/+10
| | | | | | | | | | | | The set_entry pointer can become invalid if the set table is re-hashed. This likely will fix https://bugs.freedesktop.org/show_bug.cgi?id=58012 (Regression since 56e95d3c) Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* vega: remove unused variablesFabio Pedretti2012-12-101-3/+1
| | | | Signed-off-by: Brian Paul <[email protected]>
* nvc0: comment unused nvc0_validate_zcull functionFabio Pedretti2012-12-101-0/+2
| | | | Signed-off-by: Brian Paul <[email protected]>
* nv50: remove unused OpClassStr arrayFabio Pedretti2012-12-101-20/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* r200: fix broken tcl lightingsmoki2012-12-101-10/+10
| | | | | | | command mistakenly used vector instead of scalar emit (the more or less identical code in radeon is already correct). Seems like it would be broken ever since kms probably. Should fix bugs 22576, 26809.
* st_glsl_to_tgsi: fix ubo bools.Dave Airlie2012-12-101-2/+19
| | | | | | | This should fix the ubo boolean tests, along with the previous ubo loading fix. Signed-off-by: Dave Airlie <[email protected]>
* st_glsl_to_tgsi: call ubo load pass earlierDave Airlie2012-12-101-1/+2
| | | | | | This calls it in around the same place as the 965 driver. Signed-off-by: Dave Airlie <[email protected]>
* glsl_to_tgsi: fix texture offset translationDave Airlie2012-12-101-4/+7
| | | | | | | | | | | I noticed the texelFetch offset test failed on 2D rect samplers with GLSL 1.40. This is because I wrote the immediate->offset translation wrong. Fixed the translation to actually use the ureg info to set the offsets up. Signed-off-by: Dave Airlie <[email protected]>
* drisw: fix up context and apis for software contextDave Airlie2012-12-091-0/+16
| | | | | | | This ports over from the dri2 code to the drisw bits. It means 3.1 core contexts now work for softpipe. Signed-off-by: Dave Airlie <[email protected]>
* i965: Add missing _NEW_BUFFERS dirty bit in Gen7 SBE state.Kenneth Graunke2012-12-081-1/+2
| | | | | | | | This is needed to compute render_to_fbo. It even has the comment. NOTE: This is a candidate for stable branches. Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: set PIPE_BIND_SAMPLER_VIEW for TBOs in st_bufferobj_dataChristoph Bumiller2012-12-081-0/+3
|
* nvc0/ir: allow neg,abs modifiers on OP_SET with integer resultChristoph Bumiller2012-12-081-0/+4
|
* nvc0/ir/emit: fix check for flags register use in logic opsChristoph Bumiller2012-12-081-3/+3
|
* draw: fix/improve dirty state validationBrian Paul2012-12-088-23/+68
| | | | | | | | | | | | | | | | | | | | This patch does two things: 1. Constant buffer state changes were broken (but happened to work by dumb luck). The problem is we weren't calling draw_do_flush() in draw_set_mapped_constant_buffer() when we changed that state. All the other draw_set_foo() functions were calling draw_do_flush() already. 2. Use a simpler state validation step when we're changing light-weight parameter state such as constant buffers, viewport dims or clip planes. There's no need to revalidate the whole pipeline when changing state like that. The new validation method is called bind_parameters() and is called instead of the prepare() method. A new DRAW_FLUSH_PARAMETER_CHANGE flag is used to signal these light-weight state changes. This results in a modest but measurable increase in FPS for many Mesa demos. Reviewed-by: Jose Fonseca <[email protected]>
* draw: add reminder comments about similar code in different filesBrian Paul2012-12-082-0/+11
| | | | | | | | When one function is changed, also look at the other. Presently, there are some differences with respect to geometry shaders and instanced drawing... Reviewed-by: Jose Fonseca <[email protected]>
* draw: rearrange code in llvm_middle_end_prepare()Brian Paul2012-12-081-66/+74
| | | | | | | To clean it up and make it look more like the non-LLVM fetch_pipeline_prepare() function. Reviewed-by: Jose Fonseca <[email protected]>
* draw: fix comment typoBrian Paul2012-12-081-1/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* draw: add comment on draw->pt.opt fieldBrian Paul2012-12-081-1/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* draw: update a comment about index buffersBrian Paul2012-12-081-3/+2
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* gallium/os: Fix nano->micro second concersion.José Fonseca2012-12-081-1/+1
| | | | | | copy'n'paste: best friend, worst enemy.. Trivial.
* llvmpipe: fix missing tbo cap warning.Dave Airlie2012-12-081-0/+1
| | | | Signed-off-by: Dave Airlie <[email protected]>
* mesa/st: add ARB_uniform_buffer_object support (v2)Dave Airlie2012-12-086-7/+147
| | | | | | | | | | | | | | | | this adds UBO support to the state tracker, it works with softpipe as-is. It uses UARL + CONST[x][ADDR[0].x] type constructs. v2: don't disable UBOs if geom shaders don't exist (me) rename upload to bind (calim) fix 12 -> 13 comparison as comment (calim + brianp) fix signed->unsigned (Brian) remove assert (Brian) Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* softpipe: enable GLSL 1.40Dave Airlie2012-12-081-1/+1
| | | | | | This enables GLSL 1.40 advertising by softpipe. Signed-off-by: Dave Airlie <[email protected]>
* softpipe: add texture buffer object supportDave Airlie2012-12-082-1/+9
| | | | | | This adds TBO support to softpipe. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: add option to enable GLSL 1.40Dave Airlie2012-12-081-1/+6
| | | | | | Allow GLSL 1.40 to be enabled if the driver advertises it. Signed-off-by: Dave Airlie <[email protected]>
* st/mesa: add texture buffer object support to state tracker (v1.1)Dave Airlie2012-12-085-7/+31
| | | | | | | | | | This adds the necessary changes to the st to allow texture buffer object support if the driver advertises it. v1.1: remove extra blank line and whitespace Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium: add new texture buffer object capabilityDave Airlie2012-12-081-1/+2
| | | | | | this just adds the define to the header. Signed-off-by: Dave Airlie <[email protected]>
* mesa/meta: Move declaration before statements.José Fonseca2012-12-081-1/+2
|
* mesa: Move declaration before statement.José Fonseca2012-12-081-1/+2
| | | | For MSVC's sake.
* intel: Enable ETC2 support on intel hardwareAnuj Phogat2012-12-073-50/+98
| | | | | | | | | | | | | | | | | | | | This patch enables support for ETC2 compressed textures on all intel hardware. At present, ETC2 texture decoding is not available on intel hardware. So, compressed ETC2 texture data is decoded in software and stored in a suitable uncompressed MESA_FORMAT at the time of glCompressedTexImage2D. Currently, ETC2 formats are only exposed in OpenGL ES 3.0. V2: Use single etc_wraps variable for both etc1 and etc2. V3: Remove redundant code and use just one intel_miptree_map_etc() and intel_miptree_unmap_etc() function. Choose MESA_FORMAT_SIGNED_{R16, GR1616} for ETC2 signed-{r11, rg11} formats Signed-off-by: Anuj Phogat <[email protected]> Tested-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add decoding functions for GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2Anuj Phogat2012-12-075-4/+90
| | | | | | | | Data in GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 format is decoded and stored in MESA_FORMAT_SARGB. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add decoding functions for GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2Anuj Phogat2012-12-075-25/+171
| | | | | | | | Data in GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 format is decoded and stored in MESA_FORMAT_RGBA8888_REV. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add decoding functions for GL_COMPRESSED_SIGNED_RG11_EACAnuj Phogat2012-12-075-3/+98
| | | | | | | | Data in GL_COMPRESSED_SIGNED_RG11_EAC format is decoded and stored in MESA_FORMAT_SIGNED_GR1616. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add decoding functions for GL_COMPRESSED_SIGNED_R11_EACAnuj Phogat2012-12-075-3/+126
| | | | | | | | | | | | | | | | | | | | | | | | | Data in GL_COMPRESSED_SIGNED_R11_EAC format is decoded and stored in MESA_FORMAT_SIGNED_R16. v2: 16 bit signed data is converted to 16 bit unsigned data by adding 2 ^ 15 and stored in an unsigned texture format. v3: 1. Handle a corner case when base code word value is -128. As per OpenGL ES 3.0 specification -128 is not an allowed value and should be truncated to -127. 2. Converting a decoded 16 bit signed data to 16 bit unsigned data by adding 2 ^ 15 gives us an output which matches the decompressed image (.ppm) generated by ericsson's etcpack tool. ericsson is also doing this conversion in their tool because .ppm image files don't support signed data. But gles 3.0 specification doesn't suggest this conversion. We need to keep the decoded data in signed format. Both signed format tests in gles3 conformance pass with these changes. Signed-off-by: Anuj Phogat <[email protected]> Tested-by: Matt Turner <[email protected]> Reviewed-by: Brian Paul <[email protected]>