Commit graph

41900 commits

Author SHA1 Message Date
Brian Paul
f6fa34f7ad postprocess: remove const qualifiers on unsigned int parameters
to match the prototype in postprocess.h
2011-11-01 16:39:37 -06:00
Chia-I Wu
45568faba2 scons: include src/glsl/Makefile.sources
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-02 06:36:58 +08:00
Chia-I Wu
fb0e4a23fa android: include src/glsl/Makefile.sources
This also fixes the build error due to missing link_uniforms.cpp in the source
lists.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad@chad-versace.us>

[olv: the missing link_uniforms.cpp was added before this patch is committed]
2011-11-02 06:36:24 +08:00
Chia-I Wu
dfdb34b7c1 glsl: Refactor source lists to Makefile.sources
With the hope that Android.mk and SConscript can share the file to reduce
future breakage.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-11-02 06:34:39 +08:00
Vinson Lee
3d6d443481 mesa: Fix memory leak in out-of-memory path.
Fixes Coverity resource leak defect.
2011-11-01 14:41:24 -07:00
Adam Jackson
6d3d0ca9e9 drisw: Enable SGI_make_current_read for direct contexts
Equivalent to glXMakeContextCurrent, which had better already work since
we advertise GLX 1.3.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-11-01 13:52:48 -04:00
Thomas Hellstrom
dc4ef91601 st/xa: Add a scanout flag for surfaces
Bump minor to signal availability.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2011-11-01 18:18:14 +01:00
Eugeni Dodonov
48a4b9b70c Build link_uniforms for android
Otherwise android-x86 build fails.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-11-01 15:05:24 -02:00
José Fonseca
a1b737d72f llvmpipe: Re-advertise support for stencil formats...
"no fetch_rgba_float for uint formats" => "llvmpipe does not support uint formats"

"stencil == uint" => "llvmpipe does not support stencil"
2011-11-01 12:28:47 +00:00
José Fonseca
0cbb49aff5 llvmpipe: Use -1 instead of ~0 for "no slot".
As the value of unsigned ~0 depends on the bit-width.

Fixes fdo 42411.
2011-11-01 11:29:31 +00:00
Nicholas Miell
66389bb99d dri/nouveau: Enable NV_fog_distance on NV10 and NV20 hardware
Add support for NV_fog_distance to the NV10 and NV20 drivers.

[ Francisco Jerez: Fix fog coord. signedness for
  GL_EYE_RADIAL_NV/GL_EYE_PLANE on nv20 ]
2011-11-01 11:37:11 +01:00
Nicholas Miell
64cebb6c83 st/mesa: Enable NV_fog_distance for Gallium drivers
The fixed-function generated vertex program is all that's needed for
Gallium drivers.
2011-11-01 11:37:11 +01:00
Nicholas Miell
fadd5e1b00 mesa: Add NV_fog_distance to the fixed-function vertex program generator
This is all that is needed to implement NV_fog_distance on programmable
hardware.
2011-11-01 11:37:10 +01:00
Nicholas Miell
740467dd62 mesa: Add the basics for the NV_fog_distance extension
No driver implements it yet.
2011-11-01 11:37:10 +01:00
José Fonseca
7f08248c2e ralloc: Use _vscprintf on MinGW.
MinGW uses MSVC's runtime DLLs for most of C runtime's functions, and
there has same semantics for vsnprintf.

Not sure how this worked until now -- maybe one of the internal
vsnprintf implementations was taking precedence.
2011-11-01 08:47:39 +00:00
José Fonseca
e33447aac6 svga: Fix potential buffer overflow in rs draw state.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-10-31 21:33:04 +00:00
José Fonseca
0f26c6ae3f llvmpipe: Remove unsed variables. 2011-10-31 19:40:54 +00:00
José Fonseca
7ff247712d util: Add missing initializer. 2011-10-31 19:40:54 +00:00
Paul Berry
9734bd0560 i965: Fix flat integral varyings.
Previously, the vertex and fragment shader back-ends assumed that all
varyings were floats.  In GLSL 1.30 this is no longer true--they can
also be of integral types provided that they have an interpolation
qualifier of "flat".

This required two changes in each back-end: assigning the correct type
to the register that holds the varying value during shader execution,
and assigning the correct type to the register that ties the varying
value to the rest of the graphics pipeline (the message register in
the case of VS, and the payload register in the case of FS).

Fixes piglit tests fs-int-interpolation and fs-uint-interpolation.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-31 11:29:44 -07:00
Paul Berry
fa0066ae2b mesa: Add glsl_type::get_scalar_type() function.
This function is similar to get_base_type(), but when called on
arrays, it returns the scalar type composing the array.  For example,
glsl_type(vec4[]) => float_type.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-31 11:29:14 -07:00
Paul Berry
f40c6b2a99 i965/gen6+: Switch GLSL from ALT to IEEE floating point mode
i965 graphics hardware has two floating point modes: ALT and IEEE.  In
ALT mode, floating-point operations never generate infinities or NaNs,
and MOV instructions translate infinities and NaNs to finite values.
In IEEE mode, infinities and NaNs behave as specified in the IEEE 754
spec.

Previously, we used ALT mode for all vertex and fragment programs,
whether they were GLSL programs or ARB programs.  The GLSL spec is
sufficiently vague about how infs and nans are to be handled that it
was unclear whether this mode was compliant with the GLSL 1.30 spec or
not, and it made it very difficult to test the isinf() and isnan()
functions.

This patch changes i965 GLSL programs to use IEEE floating-point mode,
which is clearly compliant with GLSL 1.30's inf/nan requirements.  In
addition to making the Piglit isinf and isnan tests pass, this paves
the way for future support of the ARB_shader_precision extension.

Unfortunately we still have to use ALT floating-point mode when
executing ARB programs, because those programs require 0^0 == 1, and
i965 hardware generates 0^0 == NaN in IEEE mode.

Fixes piglit tests "isinf-and-isnan fs_fbo", "isinf-and-isnan vs_fbo",
and {fs,vs}-{isinf,isnan}-{vec2,vec3,vec4}.
2011-10-31 11:24:03 -07:00
Paul Berry
ede60bc467 glsl: Add isinf() and isnan() builtins.
The implementations are as follows:

isinf(x) = (abs(x) == +infinity)
isnan(x) = (x != x)

Note: the latter formula is not necessarily obvious.  It works because
NaN is the only floating point number that does not equal itself.

Fixes piglit tests "isinf-and-isnan fs_basic" and "isinf-and-isnan
vs_basic".
2011-10-31 11:24:03 -07:00
Paul Berry
b6f32bbe12 glsl: Add '.ir' extension to builtin IR files
This patch adds the extension '.ir' to all the files in
src/glsl/builtins/ir/, and changes generate_builtins.py so that it no
longer globs on '*' to find the files to build.  This prevents
spurious files (such as EMACS' infamous *~ backup files) from breaking
the build.
2011-10-31 11:24:03 -07:00
Paul Berry
b726639e1b glsl: Fix copy-paste error in constant_expression_value(ir_binop_nequal)
The implementation of ir_binop_nequal in constant_expression_value()
appears to have been copy-and-pasted from the implementation of
ir_binop_equal, but with all instances of '==' changed to '!='.  This
is correct except for one minor flaw: one of those '==' operators was
in an assertion checking that the types of the two arguments were
equal.  That one needs to stay an '=='.

Fixes piglit tests {fs,vs}-inline-notequal.
2011-10-31 11:24:03 -07:00
Brian Paul
414e183ed7 mesa: add note about immutable textures for _mesa_test_texobj_completeness() 2011-10-31 10:52:57 -06:00
Brian Paul
12d69fca09 swrast: implement GL_ARB_texture_storage 2011-10-31 10:52:57 -06:00
Brian Paul
e0a0496971 st/mesa: implement GL_ARB_texture_storage 2011-10-31 10:52:57 -06:00
Brian Paul
2ace9ffc8e mesa: plug in dispatch functions for GL_ARB_texture_storage 2011-10-31 10:52:57 -06:00
Brian Paul
29eb2e8944 mesa: compile new texstore.c file 2011-10-31 10:52:56 -06:00
Brian Paul
a7d9e449f0 mesa: init extension entry for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
Brian Paul
7d577d703d mesa: display list dispatch for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
Brian Paul
a0d736b3b7 mesa: new glTexImage error checks for GL_ARB_texture_storage
If the texture memory was allocated with glTexStorage1/2/3D() we can
only change the image data with glTexSubImage calls.
2011-10-31 10:52:56 -06:00
Brian Paul
fbc419314e mesa: glGetTexParameter support for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
Brian Paul
a8fcb7927b mesa: implement new functions for GL_ARB_texture_storage
This is the glTexStorage1D/2D/3D() functions.  Basically do error
checking then call the driver hook to actually allocate memory.
2011-10-31 10:52:56 -06:00
Brian Paul
ae9bef240d glapi: regenerated API files for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
Brian Paul
af95504dad glapi: new API specs for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
Brian Paul
2e322bb8d1 mesa: add new driver hook for AllocTextureStorage() 2011-10-31 10:52:56 -06:00
Brian Paul
b296315881 mesa: add new fields for GL_ARB_texture_storage 2011-10-31 10:52:56 -06:00
José Fonseca
1e9d8934a1 svga: Flush the hwtnl primitives before writing to buffers.
svga keeps a small queue of similar primitive draws in order to coalesce
them into a single draw primitive command.

But the buffers referred in primitives not yet emitted were being ignored
in the considerations to flush or not the context.

This fixes piglit vbo-map-remap, vbo-subdata-sync, vbo-subdata-zero, and
Seeker.

Based on investigation and patch from Brian Paul.

Reviewed-By: Brian Paul <brianp@vmware.com>
2011-10-31 15:22:09 +00:00
Thomas Hellstrom
c04b9d1d56 st/xa: Plug a pipe context leak.
Forgot to destroy the pipe context on xa context destroy.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-10-31 14:35:23 +01:00
Thomas Hellstrom
037e7a68f5 pipebuffer/debug: Fix a recursive mutex lock
pb_debug_manager_dump was trying to take a lock already
held by all callers.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Jos Fonseca <jfonseca@vmware.com>
2011-10-31 13:25:39 +01:00
Dave Airlie
56d30bb00d radeon/r200: drop remains of r300/r600 support along with old drm 1.x kernel
This drops all the old drmSupports* checks since KMS does them all, and it
also drop R300_CLASS and R600_CLASS.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-30 16:40:56 +00:00
Chia-I Wu
e252af3406 llvmpipe: fix a crash in non-SSE path
It is a typo went unnoticed.
2011-10-30 20:05:05 +08:00
Chia-I Wu
d1d456a774 intel: enable GL_OES_draw_texture 2011-10-30 20:00:07 +08:00
Chia-I Wu
b4dc35d9bc meta: add _mesa_meta_DrawTex()
It is set to dd->DrawTex.

Reviewed-by: Brian Paul <brianp@vmware.com>

[olv: set dd->DrawTex in _mesa_init_driver_functions]
2011-10-30 20:00:03 +08:00
Marek Olšák
9eac0fce83 r600g: reset the render condition to NULL when rendering unconditionally 2011-10-30 02:25:51 +02:00
Marek Olšák
b40edc63d7 r600g: shortcut ctx->screen->ws to ctx->ws 2011-10-30 02:25:51 +02:00
Eric Anholt
44c65d0e4e i965: Remove the prepare() hook from state atoms.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:17:26 -07:00
Eric Anholt
2649ff4d90 i965: Remove the memcpy()ed atoms array now that everything is emit()-based.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:17:23 -07:00
Eric Anholt
35c7e8cebe i965: Merge brw_validate_state() and brw_upload_state() together.
They were called back-to-back at this point.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
2011-10-29 12:17:21 -07:00