summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* mesa: Add decoding functions for GL_COMPRESSED_RG11_EACAnuj Phogat2012-12-075-4/+98
| | | | | | | | Data in GL_COMPRESSED_RG11_EAC format is decoded and stored in MESA_FORMAT_RG1616. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add decoding functions for GL_COMPRESSED_R11_EACAnuj Phogat2012-12-075-6/+128
| | | | | | | | Data in GL_COMPRESSED_R11_EAC format is decoded and stored in MESA_FORMAT_R16. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add decoding functions for GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EACAnuj Phogat2012-12-075-3/+91
| | | | | | | | Data in GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC format is decoded and stored in MESA_FORMAT_SARGB8. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add decoding functions for GL_COMPRESSED_RGBA8_ETC2_EACAnuj Phogat2012-12-075-7/+151
| | | | | | | | Data in GL_COMPRESSED_RGBA8_ETC2_EAC 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_SRGB8_ETC2Anuj Phogat2012-12-075-7/+89
| | | | | | | | Data in GL_COMPRESSED_SRGB8_ETC2 format is decoded and stored in MESA_FORMAT_SARGB8. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add decoding functions for GL_COMPRESSED_RGB8_ETC2Anuj Phogat2012-12-075-13/+469
| | | | | | | | | Data in GL_COMPRESSED_RGB8_ETC2 format is decoded and stored in MESA_FORMAT_RGBX8888_REV. v2: Use CLAMP macro and stdbool.h Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Make nonlinear_to_linear() function available outside fileAnuj Phogat2012-12-073-52/+29
| | | | | | | | | This patch changes nonlinear_to_linear() function to non static inline and makes it available outside format_unpack.c. Also, removes the duplicate copies in other files. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add new MESA_FORMATs for ETC2 compressed texturesAnuj Phogat2012-12-079-1/+468
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is required by OpenGL ES 3.0 to support ETC2 textures. This patch adds new MESA_FORMATs for following etc2 texture formats: GL_COMPRESSED_RGB8_ETC2 GL_COMPRESSED_SRGB8_ETC2 GL_COMPRESSED_RGBA8_ETC2_EAC GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC GL_COMPRESSED_R11_EAC GL_COMPRESSED_RG11_EAC GL_COMPRESSED_SIGNED_R11_EAC GL_COMPRESSED_SIGNED_RG11_EAC MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1 MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1 Above formats are currently available in only gles 3.0. v2: Add entries in texfetch_funcs[] array. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]> v3 (Paul Berry <[email protected]>): comment out symbols that are not implemented yet, so that this commit compiles on its own; future commits will uncomment the symbols as they become available.
* meta: Use #version 300 es for _mesa_glsl_Clear's integer shaders on ES3.Kenneth Graunke2012-12-071-17/+27
| | | | | | | Fixes es3conform's color_buffer_float_clamp_(fixed|on|off) tests. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meta: Use #version 300 es in GenerateMipmap shaders on ES3.Kenneth Graunke2012-12-071-11/+13
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* Set es_version to false when using FF fragment shading in meta opsPaul Berry2012-12-071-0/+1
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Use the new hash table for the variable refcount visitor.Eric Anholt2012-12-077-22/+45
| | | | | | | Reviewed-by: Jordan Justen <[email protected]> [[email protected]: open_hash_table => hash_table] Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* program/hash_table.c: rename to program/prog_hash_table.cJordan Justen2012-12-078-10/+10
| | | | | | | | Removes a collision of the object file name for main/hash_table and program/hash_table. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Ignore size and offset parameters for BindBufferRange when buffer is 0Matt Turner2012-12-071-10/+12
| | | | | | | | | | | | The ES 3 conformance suite unbinds buffers (by binding buffer 0) and passes zero for the size and offset, which the spec explicitly disallows. Otherwise, this seems like a reasonable thing to do. Khronos will be changing the spec to allow this (bug 9765). Fixes es3conform's transform_feedback_init_defaults test. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* nv50,nvc0: fix shader evictionChristoph Bumiller2012-12-072-2/+19
|
* nv50,nvc0: add support for cube map arraysChristoph Bumiller2012-12-0716-37/+88
| | | | NOTE: nv50 support not enabled, someone with nva3/8 please fix.
* r300: Don't disable destination read if the src blend factor needs itStefan Dösinger2012-12-071-2/+10
| | | | | | | | | | | The read can remain disabled if the src alpha factor needs it because the result would still be zero. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57984 NOTE: This is a candidate for stable release branches. Signed-off-by: Marek Olšák <[email protected]>
* gallium/egl-static: Fix unresolved symbol 'clock_gettime'.Michel Dänzer2012-12-071-2/+2
| | | | | Reviewed-by: Jose Fonseca <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
* gallivm: Rudimentary native integer support.José Fonseca2012-12-072-5/+20
| | | | | | | | | Just enough for draw module to work ok. This improves "piglit attribs GL3", though something fishy is still happening with certain unsigned integer values. Reviewed-by: Brian Paul <[email protected]>
* draw: Dump LLVM shader key.José Fonseca2012-12-072-1/+33
| | | | | | Just like we do in llvmpipe for the fragment shader compilation key. Reviewed-by: Brian Paul <[email protected]>
* gallivm: Allow indirection from TEMP registers too.José Fonseca2012-12-071-3/+18
| | | | | | | | The ADDR file is cumbersome for native integer capable drivers. We should consider deprecating it eventually, but this just adds support for indirection from TEMP registers. Reviewed-by: Brian Paul <[email protected]>
* gallivm,llvmpipe,draw: Support multiple constant buffers.José Fonseca2012-12-0713-61/+103
| | | | | | | | | | | Support 16 (defined in LP_MAX_TGSI_CONST_BUFFERS) as opposed to 32 (as defined by PIPE_MAX_CONSTANT_BUFFERS) because that would make the jit context become unnecessarily large. v2: Bump limit from 4 to 16 to cover ARB_uniform_buffer_object needs, per Dave Airlie. Reviewed-by: Brian Paul <[email protected]>