mesa.git
14 years agoglsl: Add ir_quadop_vector expression
Ian Romanick [Tue, 16 Nov 2010 20:01:42 +0000 (12:01 -0800)]
glsl: Add ir_quadop_vector expression

The vector operator collects 2, 3, or 4 scalar components into a
vector.  Doing this has several advantages.  First, it will make
ud-chain tracking for components of vectors much easier.  Second, a
later optimization pass could collect scalars into vectors to allow
generation of SWZ instructions (or similar as operands to other
instructions on R200 and i915).  It also enables an easy way to
generate IR for SWZ instructions in the ARB_vertex_program assembler.

14 years agoglsl: Add unary ir_expression constructor
Ian Romanick [Tue, 9 Nov 2010 22:19:10 +0000 (14:19 -0800)]
glsl: Add unary ir_expression constructor

14 years agoglsl: Add ir_rvalue::is_negative_one predicate
Ian Romanick [Tue, 16 Nov 2010 19:59:22 +0000 (11:59 -0800)]
glsl: Add ir_rvalue::is_negative_one predicate

14 years agoglsl: Eliminate assumptions about size of ir_expression::operands
Ian Romanick [Thu, 11 Nov 2010 00:33:10 +0000 (16:33 -0800)]
glsl: Eliminate assumptions about size of ir_expression::operands

This may grow in the near future.

14 years agoglsl: Add ir_unop_sin_reduced and ir_unop_cos_reduced
Ian Romanick [Thu, 18 Nov 2010 19:05:32 +0000 (11:05 -0800)]
glsl: Add ir_unop_sin_reduced and ir_unop_cos_reduced

The operate just like ir_unop_sin and ir_unop_cos except that they
expect their inputs to be limited to the range [-pi, pi].  Several
GPUs require this limited range for their sine and cosine
instructions, so having these as operations (along with a to-be-written
lowering pass) helps this architectures.

These new operations also matche the semantics of the
GL_ARB_fragment_program SCS instruction.  Having these as operations
helps in generating GLSL IR directly from assembly fragment programs.

14 years agor600g: use full range of VS resources for vertex samplers
Alex Deucher [Fri, 19 Nov 2010 20:51:24 +0000 (15:51 -0500)]
r600g: use full range of VS resources for vertex samplers

Now that we have fetch shaders, the full range of VS resources
can be used for sampling.

14 years agor600g: use meaningful defines for chiprev
Alex Deucher [Fri, 19 Nov 2010 20:32:02 +0000 (15:32 -0500)]
r600g: use meaningful defines for chiprev

Makes the code much clearer.

14 years agor600g: translate ARR instruction for evergreen
Alex Deucher [Fri, 19 Nov 2010 20:19:39 +0000 (15:19 -0500)]
r600g: translate ARR instruction for evergreen

evergreen variant of:
9f7ec103e26c67cb077fd7d94d2fb68562b86c40

14 years agor600g: add fetch shader capabilities
Jerome Glisse [Thu, 18 Nov 2010 19:29:16 +0000 (14:29 -0500)]
r600g: add fetch shader capabilities

Use fetch shader instead of having fetch instruction in the vertex
shader. Allow to restrict shader update to a smaller part when
vertex buffer input layout changes.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agor600g: All EVENT_WRITE packets need the EVENT_INDEX field
Alex Deucher [Fri, 19 Nov 2010 18:34:22 +0000 (13:34 -0500)]
r600g: All EVENT_WRITE packets need the EVENT_INDEX field

6xx-evergreen

14 years agodri/nouveau: Clean up magic numbers in get_rt_format
Viktor Novotný [Tue, 16 Nov 2010 22:22:33 +0000 (23:22 +0100)]
dri/nouveau: Clean up magic numbers in get_rt_format

Signed-off-by: Viktor Novotný <noviktor@seznam.cz>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
14 years agor600g: fix occlusion query on evergreen (avoid lockup)
Jerome Glisse [Fri, 19 Nov 2010 16:51:37 +0000 (11:51 -0500)]
r600g: fix occlusion query on evergreen (avoid lockup)

Occlusion query on evergreen need the event index field to be
set otherwise we endup locking up the GPU.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agoir_to_mesa: Generate smarter code for some conditional moves
Ian Romanick [Fri, 19 Nov 2010 00:11:25 +0000 (16:11 -0800)]
ir_to_mesa: Generate smarter code for some conditional moves

Condiation moves with a condition of (a < 0), (a > 0), (a <= 0), or (a
>= 0) can be generated with "a" directly as an operand of the CMP
instruction.  This doesn't help much now, but it will help with
assembly shaders that use the CMP instruction.

14 years agoglsl: Make is_zero and is_one virtual methods of ir_rvalue
Ian Romanick [Fri, 19 Nov 2010 01:11:17 +0000 (17:11 -0800)]
glsl: Make is_zero and is_one virtual methods of ir_rvalue

This eliminates the need in some cames to validate that an rvalue is
an ir_constant before checking to see if it's 0 or 1.

14 years agomesa: pass gl_format to _mesa_init_teximage_fields()
Brian Paul [Thu, 18 Nov 2010 23:15:33 +0000 (16:15 -0700)]
mesa: pass gl_format to _mesa_init_teximage_fields()

This should prevent the field going unset in the future.  See bug
http://bugs.freedesktop.org/show_bug.cgi?id=31544 for background.

Also remove unneeded calls to clear_teximage_fields().

Finally, call _mesa_set_fetch_functions() from the
_mesa_init_teximage_fields() function so callers have one less
thing to worry about.

14 years agoscons: Use inline wrap helpers more consistently.
José Fonseca [Thu, 18 Nov 2010 13:02:36 +0000 (13:02 +0000)]
scons: Use inline wrap helpers more consistently.

14 years agogallium/noop: report GL 2.1
Dave Airlie [Thu, 18 Nov 2010 08:10:55 +0000 (18:10 +1000)]
gallium/noop: report GL 2.1

this should at least make app use the same paths as they would for a real
driver.

14 years agoglsl: Fix 'control reaches end of non-void function' warning.
Vinson Lee [Thu, 18 Nov 2010 06:42:51 +0000 (22:42 -0800)]
glsl: Fix 'control reaches end of non-void function' warning.

Fix this GCC warning.
ir.cpp: In static member function
'static unsigned int ir_expression::get_num_operands(ir_expression_operation)':
ir.cpp:199: warning: control reaches end of non-void function

14 years agomesa: Clean up core.h.
Chia-I Wu [Wed, 17 Nov 2010 16:08:01 +0000 (00:08 +0800)]
mesa: Clean up core.h.

Remove version.h and context.h from core.h.

14 years agost/glx: Replace MESA_VERSION_STRING by xmesa_get_name.
Chia-I Wu [Wed, 17 Nov 2010 15:43:01 +0000 (23:43 +0800)]
st/glx: Replace MESA_VERSION_STRING by xmesa_get_name.

xmesa_get_name returns the name of the st_api, which is the same as
MESA_VERSION_STRING.

14 years agost/wgl: Use st_context_iface::share for DrvShareLists.
Chia-I Wu [Wed, 10 Nov 2010 16:21:12 +0000 (00:21 +0800)]
st/wgl: Use st_context_iface::share for DrvShareLists.

14 years agogallium: Add st_context_iface::share to st_api.
Chia-I Wu [Wed, 10 Nov 2010 16:09:09 +0000 (00:09 +0800)]
gallium: Add st_context_iface::share to st_api.

It will be used to implement wglShareLists.  Fill st_context_iface::copy
for glXCopyContext as well.

14 years agogallium: Add st_api::name.
Chia-I Wu [Wed, 17 Nov 2010 15:56:42 +0000 (23:56 +0800)]
gallium: Add st_api::name.

It is the name of the rendering API.  This field is informative.

14 years agost/vega: Do not wait NULL fences.
Chia-I Wu [Wed, 17 Nov 2010 15:35:02 +0000 (23:35 +0800)]
st/vega: Do not wait NULL fences.

14 years agoi965: Eliminate dead code more aggressively.
Eric Anholt [Thu, 18 Nov 2010 02:44:34 +0000 (10:44 +0800)]
i965: Eliminate dead code more aggressively.

If an instruction writes reg but nothing later uses it, then we don't
need to bother doing it.  Before, we were just killing code that was
never read after it was ever written.

This removes many interpolation instructions for attributes with only
a few comopnents used.  Improves nexuiz high-settings performance .46%
+/- .12% (n=3) on my Ironlake.

14 years agomesa: upgrade to glext.h version 66
Brian Paul [Wed, 17 Nov 2010 15:10:26 +0000 (08:10 -0700)]
mesa: upgrade to glext.h version 66

The type of the num/count parameter to glProgramParameters4[df]vNV()
changed so some API dispatch code needed updates too.

14 years agor600g: fix buffer alignment
Alex Deucher [Thu, 18 Nov 2010 02:30:09 +0000 (21:30 -0500)]
r600g: fix buffer alignment

This should fix the remaining buffer alignment issues in r600g.

14 years agoi965: Fail on loops on gen6 for now until we write the EU emit code for it.
Eric Anholt [Wed, 17 Nov 2010 06:59:08 +0000 (14:59 +0800)]
i965: Fail on loops on gen6 for now until we write the EU emit code for it.

14 years agoi965: Add dumping of the sampler default color.
Eric Anholt [Mon, 15 Nov 2010 23:41:40 +0000 (07:41 +0800)]
i965: Add dumping of the sampler default color.

14 years agoi965: Add state dumping for sampler state.
Eric Anholt [Mon, 15 Nov 2010 23:34:32 +0000 (07:34 +0800)]
i965: Add state dumping for sampler state.

14 years agomesa: Don't spam the console in a debug build unless some spam is requested.
Eric Anholt [Sat, 13 Nov 2010 22:30:01 +0000 (14:30 -0800)]
mesa: Don't spam the console in a debug build unless some spam is requested.

It's annoying to use test suites under a Mesa debug build because
pretty output is cluttered with stderr's continuous reports that
you're still using the debug driver.

14 years agoi965: Shut up spurious gcc warning about GLSL_TYPE enums.
Eric Anholt [Wed, 17 Nov 2010 07:06:22 +0000 (15:06 +0800)]
i965: Shut up spurious gcc warning about GLSL_TYPE enums.

14 years agogallium: Remove redundant sw and debug target helpers
Jakob Bornecrantz [Wed, 10 Nov 2010 22:49:40 +0000 (22:49 +0000)]
gallium: Remove redundant sw and debug target helpers

14 years agograw: Use inline debug helper instead of non-inline version
Jakob Bornecrantz [Wed, 10 Nov 2010 22:02:39 +0000 (22:02 +0000)]
graw: Use inline debug helper instead of non-inline version

14 years agolibgl-xlib: Use inline debug helper instead of non-inline version
Jakob Bornecrantz [Wed, 10 Nov 2010 23:42:17 +0000 (23:42 +0000)]
libgl-xlib: Use inline debug helper instead of non-inline version

14 years agoglsl: Improve usage message for glsl_compiler
Chad Versace [Wed, 17 Nov 2010 23:28:36 +0000 (15:28 -0800)]
glsl: Improve usage message for glsl_compiler

The new usage message lists possible command line options. (Newcomers to Mesa
currently have to trawl through the source to find the command line options,
and we should save them from that trouble.)

Example Output
--------------
usage: ./glsl_compiler [options] <file.vert | file.geom | file.frag>

Possible options are:
    --glsl-es
    --dump-ast
    --dump-hir
    --dump-lir
    --link

14 years agoglsl: Refactor get_num_operands.
Kenneth Graunke [Wed, 17 Nov 2010 23:31:35 +0000 (15:31 -0800)]
glsl: Refactor get_num_operands.

This adds sentinel values to the ir_expression_operation enum type:
ir_last_unop, ir_last_binop, and ir_last_opcode.  They are set to the
previous one so they don't trigger "unhandled case in switch statement"
warnings, but should never be handled directly.

This allows us to remove the huge array of 1s and 2s in
ir_expression::get_num_operands().

14 years agor600g: code cleanup (indent, trailing space, empty line ...)
Jerome Glisse [Wed, 17 Nov 2010 22:20:59 +0000 (17:20 -0500)]
r600g: code cleanup (indent, trailing space, empty line ...)

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agoglsl: Remove the ir_binop_cross opcode.
Kenneth Graunke [Wed, 17 Nov 2010 21:59:17 +0000 (13:59 -0800)]
glsl: Remove the ir_binop_cross opcode.

14 years agoRefresh autogenerated file builtin_function.cpp.
Kenneth Graunke [Wed, 17 Nov 2010 21:37:16 +0000 (13:37 -0800)]
Refresh autogenerated file builtin_function.cpp.

14 years agoglsl: Reimplement the "cross" built-in without ir_binop_cross.
Kenneth Graunke [Wed, 17 Nov 2010 21:20:30 +0000 (13:20 -0800)]
glsl: Reimplement the "cross" built-in without ir_binop_cross.

We are not aware of any GPU that actually implements the cross product
as a single instruction.  Hence, there's no need for it to be an opcode.
Future commits will remove it entirely.

14 years agoRegenerate glcpp parser.
Kenneth Graunke [Wed, 17 Nov 2010 20:53:07 +0000 (12:53 -0800)]
Regenerate glcpp parser.

14 years agoglsl: Unconditionally define GL_FRAGMENT_PRECISION_HIGH in ES2 shaders.
Kenneth Graunke [Wed, 17 Nov 2010 20:50:35 +0000 (12:50 -0800)]
glsl: Unconditionally define GL_FRAGMENT_PRECISION_HIGH in ES2 shaders.

This is really supposed to be defined only if the driver supports highp
in the fragment shader - but all of our current ES2 implementations do.
So, just define it.  In the future, we'll need to add a flag to
gl_context and only define the macro if the flag is set.

"Fixes" freedesktop.org bug #31673.

14 years agoegl_dri2: Add missing intel chip ids.
Robert Hooker [Tue, 16 Nov 2010 20:10:20 +0000 (15:10 -0500)]
egl_dri2: Add missing intel chip ids.

Signed-off-by: Robert Hooker <robert.hooker@canonical.com>
14 years agoglsl: Fix Doxygen tag \file in recently renamed files
Chad Versace [Wed, 17 Nov 2010 18:43:10 +0000 (10:43 -0800)]
glsl: Fix Doxygen tag \file in recently renamed files

14 years agoglsl: Fix erroneous cast in ast_jump_statement::hir()
Chad Versace [Wed, 17 Nov 2010 18:28:01 +0000 (10:28 -0800)]
glsl: Fix erroneous cast in ast_jump_statement::hir()

Return values were erroneously cast from (ir_rvalue*) to (ir_expression*).

NOTE: This is a candidate for the 7.9 branch.

14 years agoglsl: Fix constant expression handling for <, >, <=, >= on vectors.
Kenneth Graunke [Wed, 17 Nov 2010 18:40:28 +0000 (10:40 -0800)]
glsl: Fix constant expression handling for <, >, <=, >= on vectors.

ir_binop_less, ir_binop_greater, ir_binop_lequal, and ir_binop_gequal
are defined to work on vectors as well as scalars, as long as the two
operands have the same type.

This is evident from both ir_validate.cpp and our use of these opcodes
in the GLSL lessThan, greaterThan, lessThanEqual, greaterThanEqual
built-in functions.

Found by code inspection.  Not known to fix any bugs.  Presumably, our
tests for the built-in comparison functions must pass because C.E.
handling is done on the ir_call of "greaterThan" rather than the inlined
opcode.  The C.E. handling of the built-in function calls is correct.

NOTE: This is a candidate for the 7.9 branch.

14 years agor300g: print FS inputs uninitialized due to hardware limits to stderr
Marek Olšák [Wed, 17 Nov 2010 16:42:34 +0000 (17:42 +0100)]
r300g: print FS inputs uninitialized due to hardware limits to stderr

14 years agor600c/evergreen: texture align is group_bytes just like 6xx/7xx
Alex Deucher [Wed, 17 Nov 2010 16:30:52 +0000 (11:30 -0500)]
r600c/evergreen: texture align is group_bytes just like 6xx/7xx

Default group bytes to 512 on evergreen.  Don't query
tiling config yet for evergreen, the current info returned is not
adequate for evergreen (no way to get bank info).

14 years agomesa: minor clean-ups in context code
Brian Paul [Tue, 16 Nov 2010 22:47:11 +0000 (15:47 -0700)]
mesa: minor clean-ups in context code

14 years agomesa: reorder texture_error_check() params
Brian Paul [Tue, 16 Nov 2010 22:32:52 +0000 (15:32 -0700)]
mesa: reorder texture_error_check() params

To better match other functions.

14 years agomesa: 80-column wrapping
Brian Paul [Tue, 16 Nov 2010 22:30:18 +0000 (15:30 -0700)]
mesa: 80-column wrapping

14 years agomesa: whitespace cleanups
Brian Paul [Tue, 16 Nov 2010 22:23:51 +0000 (15:23 -0700)]
mesa: whitespace cleanups

14 years agomesa: fix error messages and minor reindenting
Brian Paul [Tue, 16 Nov 2010 22:15:58 +0000 (15:15 -0700)]
mesa: fix error messages and minor reindenting

14 years agoRefresh autogenerated glcpp parser.
Kenneth Graunke [Wed, 17 Nov 2010 00:21:54 +0000 (16:21 -0800)]
Refresh autogenerated glcpp parser.

14 years agoglcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version >= 1.30.
Kenneth Graunke [Wed, 17 Nov 2010 00:21:20 +0000 (16:21 -0800)]
glcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version >= 1.30.

Per section 4.5.4 of the GLSL 1.30 specification.

14 years agor600g: Synchronize supported color formats between Evergreen and r600/r700.
Henri Verbeet [Tue, 16 Nov 2010 23:29:03 +0000 (00:29 +0100)]
r600g: Synchronize supported color formats between Evergreen and r600/r700.

14 years agor600g: Swizzle vertex data only once.
Henri Verbeet [Tue, 16 Nov 2010 23:29:02 +0000 (00:29 +0100)]
r600g: Swizzle vertex data only once.

Vertex data swizzles are already done in the vertex shader. Doing them twice
breaks BGRA vertex arrays for example.

14 years agor300g: remove the hack with OPCODE_RET
Marek Olšák [Tue, 16 Nov 2010 21:19:47 +0000 (22:19 +0100)]
r300g: remove the hack with OPCODE_RET

RET was interpreted as END, which was wrong. Instead, if a shader contains RET
in the main function, it will fail to compile with an error message
from now on.

The hack is from early days.

14 years agoglsl: Simplify generation of swizzle for vector constructors
Ian Romanick [Mon, 15 Nov 2010 21:41:06 +0000 (13:41 -0800)]
glsl: Simplify generation of swizzle for vector constructors

14 years agoglsl: Refactor is_vec_{zero,one} to be methods of ir_constant
Ian Romanick [Fri, 12 Nov 2010 18:19:08 +0000 (10:19 -0800)]
glsl: Refactor is_vec_{zero,one} to be methods of ir_constant

These predicates will be used in other places soon.

14 years agolibgl-gdi: Allow to pick softpipe/llvmpipe on runtime.
José Fonseca [Tue, 16 Nov 2010 18:56:39 +0000 (18:56 +0000)]
libgl-gdi: Allow to pick softpipe/llvmpipe on runtime.

14 years agomesa: Add definitions for inverse hyperbolic function on MSVC.
Vinson Lee [Tue, 16 Nov 2010 06:00:32 +0000 (22:00 -0800)]
mesa: Add definitions for inverse hyperbolic function on MSVC.

14 years agoglsl: Add ir_constant_expression.cpp to SConscript.
Vinson Lee [Tue, 16 Nov 2010 04:54:12 +0000 (20:54 -0800)]
glsl: Add ir_constant_expression.cpp to SConscript.

This was accidentally removed in commit 32aaf89823de11e98cb59d5ec78c66cd3e74bcd4.

Fixes SCons builds.

14 years agoglsl: remove opt_constant_expression.cpp from SConscript
Brian Paul [Tue, 16 Nov 2010 01:59:39 +0000 (18:59 -0700)]
glsl: remove opt_constant_expression.cpp from SConscript

And alphabetize the opt_* files.

14 years agomesa: add more work-arounds for acoshf(), asinhf(), atahf()
Brian Paul [Tue, 16 Nov 2010 01:50:58 +0000 (18:50 -0700)]
mesa: add more work-arounds for acoshf(), asinhf(), atahf()

14 years agoglsl: fix assorted MSVC warnings
Brian Paul [Tue, 16 Nov 2010 01:48:43 +0000 (18:48 -0700)]
glsl: fix assorted MSVC warnings

14 years agost/mesa: fix glDrawPixels(depth/stencil) bugs
Brian Paul [Tue, 16 Nov 2010 01:36:50 +0000 (18:36 -0700)]
st/mesa: fix glDrawPixels(depth/stencil) bugs

When drawing GL_DEPTH_COMPONENT the usual fragment pipeline steps apply
so don't override the depth state.

When drawing GL_STENCIL_INDEX (or GL_DEPTH_STENCIL) the fragment pipeline
does not apply (only the stencil and Z writemasks apply) so disable writes
to the color buffers.

Fixes some regressions from commit ef8bb7ada98f1ddc8e2554a7336af5d669cb1290

14 years agoglsl: Rename various ir_* files to lower_* and opt_*.
Kenneth Graunke [Mon, 15 Nov 2010 22:35:46 +0000 (14:35 -0800)]
glsl: Rename various ir_* files to lower_* and opt_*.

This helps distinguish between lowering passes, optimization passes, and
other compiler code.

14 years agoglsl: Remove unused and out of date Makefile.am.
Kenneth Graunke [Mon, 15 Nov 2010 22:45:40 +0000 (14:45 -0800)]
glsl: Remove unused and out of date Makefile.am.

This was from when glsl2 lived in a separate repository and used
automake.

14 years agoglsl: Add constant expression handling for asinh, acosh, and atanh.
Kenneth Graunke [Mon, 15 Nov 2010 22:08:58 +0000 (14:08 -0800)]
glsl: Add constant expression handling for asinh, acosh, and atanh.

14 years agoglsl: Refresh autogenerated file builtin_function.cpp.
Kenneth Graunke [Mon, 15 Nov 2010 22:02:13 +0000 (14:02 -0800)]
glsl: Refresh autogenerated file builtin_function.cpp.

14 years agoglsl: Implement the asinh, acosh, and atanh built-in functions.
Kenneth Graunke [Mon, 15 Nov 2010 21:58:51 +0000 (13:58 -0800)]
glsl: Implement the asinh, acosh, and atanh built-in functions.

14 years agogenerate_builtins.py: Fix inconsistent use of tabs and spaces warning.
Kenneth Graunke [Mon, 15 Nov 2010 22:00:03 +0000 (14:00 -0800)]
generate_builtins.py: Fix inconsistent use of tabs and spaces warning.

14 years agoglsl: Refresh autogenerated lexer and parser files.
Kenneth Graunke [Sun, 14 Nov 2010 06:02:32 +0000 (22:02 -0800)]
glsl: Refresh autogenerated lexer and parser files.

For the last three commits.

14 years agoglsl: Add support for the 'u' and 'U' unsigned integer suffixes.
Kenneth Graunke [Sun, 14 Nov 2010 07:09:43 +0000 (23:09 -0800)]
glsl: Add support for the 'u' and 'U' unsigned integer suffixes.

14 years agoglsl: Add new keywords and reserved words for GLSL 1.30.
Kenneth Graunke [Sun, 14 Nov 2010 06:02:09 +0000 (22:02 -0800)]
glsl: Add new keywords and reserved words for GLSL 1.30.

14 years agoglsl: Rework reserved word/keyword handling in the lexer.
Kenneth Graunke [Sun, 14 Nov 2010 04:32:59 +0000 (20:32 -0800)]
glsl: Rework reserved word/keyword handling in the lexer.

This consolidates the TOKEN_OR_IDENTIFIER and RESERVED_WORD macros into
a single KEYWORD macro.

The old TOKEN_OR_IDENTIFIER macros handled the case of a word going from
an identifier to a keyword; the RESERVED_WORD macro handled a word going
from a reserved word to a language keyword.  However, neither could
properly handle samplerBuffer (for example), which is an identifier in
1.10 and 1.20, a reserved word in 1.30, and a keyword in 1.40 and on.

Furthermore, the existing macros didn't properly handle reserved words
in GLSL ES 1.00.  The best they could do was return a token (rather than
an identifier), resulting in an obtuse parser error, rather than a
user-friendly "you used a reserved word" error message.

14 years agoglsl: Convert glsl_type::base_type from #define'd constants to an enum.
Kenneth Graunke [Thu, 11 Nov 2010 07:20:47 +0000 (23:20 -0800)]
glsl: Convert glsl_type::base_type from #define'd constants to an enum.

This is nice because printing type->base_type in GDB will now give you a
readable name instead of a number.

14 years agoglsl: Remove GLSL_TYPE_FUNCTION define.
Kenneth Graunke [Thu, 11 Nov 2010 07:14:45 +0000 (23:14 -0800)]
glsl: Remove GLSL_TYPE_FUNCTION define.

Functions are not first class objects in GLSL, so there is never a value
of function type.  No code actually used this except for one function
which asserted it shouldn't occur.  One comment mentioned it, but was
incorrect.  So we may as well remove it entirely.

14 years agor600g: Add PIPE_FORMAT_L8A8_UNORM for Evergreen as well.
Henri Verbeet [Mon, 15 Nov 2010 21:18:12 +0000 (22:18 +0100)]
r600g: Add PIPE_FORMAT_L8A8_UNORM for Evergreen as well.

14 years agor600: Evergreen has two extra frac_bits for the sampler LOD state.
Henri Verbeet [Mon, 15 Nov 2010 21:18:12 +0000 (22:18 +0100)]
r600: Evergreen has two extra frac_bits for the sampler LOD state.

Note: this is a candidate for the 7.9 branch.

14 years agor600g: Evergreen has two extra frac_bits for the sampler LOD state.
Henri Verbeet [Mon, 15 Nov 2010 21:18:12 +0000 (22:18 +0100)]
r600g: Evergreen has two extra frac_bits for the sampler LOD state.

The (piglit) mipmap_limits test shows the issue very clearly.

14 years agor600g: Cleanup the fenced_bo list in r600_context_fini().
Henri Verbeet [Mon, 15 Nov 2010 21:18:12 +0000 (22:18 +0100)]
r600g: Cleanup the fenced_bo list in r600_context_fini().

14 years agogallium/noop: no operation gallium driver
Jerome Glisse [Mon, 15 Nov 2010 19:53:21 +0000 (14:53 -0500)]
gallium/noop: no operation gallium driver

This driver is a fake swdri driver that perform no operations
beside allocation gallium structure and buffer for upper layer
usage.

It's purpose is to help profiling core mesa/gallium without
having pipe driver overhead hidding hot spot of core code.

scons file are likely inadequate i am unfamiliar with this
build system.

To use it simply rename is to swrast_dri.so and properly set
LIBGL_DRIVERS_PATH env variable.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
14 years agodri/nouveau: Kill a bunch of ternary operators.
Francisco Jerez [Mon, 15 Nov 2010 15:48:29 +0000 (16:48 +0100)]
dri/nouveau: Kill a bunch of ternary operators.

14 years agodri/nouveau: Fix typo.
Francisco Jerez [Mon, 15 Nov 2010 15:44:31 +0000 (16:44 +0100)]
dri/nouveau: Fix typo.

14 years agodri/nouveau: Remove nouveau_class.h, finishing switch to rules-ng-ng headers
Viktor Novotný [Mon, 1 Nov 2010 00:30:50 +0000 (01:30 +0100)]
dri/nouveau: Remove nouveau_class.h, finishing switch to rules-ng-ng headers

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
14 years agodri/nouveau nv20: Use rules-ng-ng headers
Viktor Novotný [Mon, 1 Nov 2010 00:22:44 +0000 (01:22 +0100)]
dri/nouveau nv20: Use rules-ng-ng headers

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
14 years agodri/nouveau: nv10: Use rules-ng-ng headers
Viktor Novotný [Mon, 1 Nov 2010 00:26:05 +0000 (01:26 +0100)]
dri/nouveau: nv10: Use rules-ng-ng headers

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
14 years agodri/nouveau: nv04: Use rules-ng-ng headers
Viktor Novotný [Mon, 1 Nov 2010 00:26:04 +0000 (01:26 +0100)]
dri/nouveau: nv04: Use rules-ng-ng headers

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
14 years agodri/nouveau: Import headers from rules-ng-ng
Viktor Novotný [Mon, 1 Nov 2010 00:26:03 +0000 (01:26 +0100)]
dri/nouveau: Import headers from rules-ng-ng

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
14 years agoevergreen: set gl_texture_image::TexFormat field in evergreenSetTexBuffer()
Brian Paul [Mon, 15 Nov 2010 16:25:32 +0000 (09:25 -0700)]
evergreen: set gl_texture_image::TexFormat field in evergreenSetTexBuffer()

See https://bugs.freedesktop.org/show_bug.cgi?id=31544

Note: this is a candidate for the 7.9 branch.

14 years agor300: set gl_texture_image::TexFormat field in r300SetTexBuffer2()
Brian Paul [Mon, 15 Nov 2010 16:24:42 +0000 (09:24 -0700)]
r300: set gl_texture_image::TexFormat field in r300SetTexBuffer2()

See https://bugs.freedesktop.org/show_bug.cgi?id=31544

Note: this is a candidate for the 7.9 branch

14 years agor200: set gl_texture_image::TexFormat field in r200SetTexBuffer2()
Brian Paul [Mon, 15 Nov 2010 16:23:59 +0000 (09:23 -0700)]
r200: set gl_texture_image::TexFormat field in r200SetTexBuffer2()

See https://bugs.freedesktop.org/show_bug.cgi?id=31544

Note: this is a candidate for the 7.9 branch.

14 years agor600: set gl_texture_image::TexFormat field in r600SetTexBuffer2()
Brian Paul [Mon, 15 Nov 2010 16:16:31 +0000 (09:16 -0700)]
r600: set gl_texture_image::TexFormat field in r600SetTexBuffer2()

See https://bugs.freedesktop.org/show_bug.cgi?id=31544

Note: this is a candidate for the 7.9 branch.

14 years agoradeon: set gl_texture_image::TexFormat field in radeonSetTexBuffer2()
Brian Paul [Mon, 15 Nov 2010 16:15:33 +0000 (09:15 -0700)]
radeon: set gl_texture_image::TexFormat field in radeonSetTexBuffer2()

See https://bugs.freedesktop.org/show_bug.cgi?id=31544

Note: this is a candidate for the 7.9 branch

14 years agoMakefile: don't include the same files twice in the tarball
Julien Cristau [Sat, 13 Nov 2010 14:05:45 +0000 (06:05 -0800)]
Makefile: don't include the same files twice in the tarball

src/mesa/drivers/dri/*/*/*.[chS] is a superset of
src/mesa/drivers/dri/*/server/*.[ch] and
src/mesa/drivers/dri/common/xmlpool/*.[ch].
include/GL/internal/glcore.h is already in MAIN_FILES, no need for it in
DRI_FILES too.  src/glx/Makefile was listed twice.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
14 years agoradeon: fix potential segfault in renderbuffer update
Daniel Lichtenberger [Mon, 15 Nov 2010 06:32:42 +0000 (01:32 -0500)]
radeon: fix potential segfault in renderbuffer update

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=31617

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
14 years agor300g: return shader caps from Draw for SWTCL vertex shaders
Marek Olšák [Sun, 14 Nov 2010 21:32:46 +0000 (22:32 +0100)]
r300g: return shader caps from Draw for SWTCL vertex shaders