Vinson Lee [Thu, 13 Jan 2011 22:17:01 +0000 (14:17 -0800)]
r600g: Move declaration before code in r600_asm.c.
Fixes SCons build.
Christian König [Wed, 22 Dec 2010 16:45:51 +0000 (17:45 +0100)]
r600g: rework literal handling
Christian König [Mon, 20 Dec 2010 21:09:09 +0000 (22:09 +0100)]
r600g: merge alu groups
Christian König [Sat, 18 Dec 2010 20:32:16 +0000 (21:32 +0100)]
r600g: implement replacing gpr with pv and ps
Ian Romanick [Sat, 8 Jan 2011 00:53:59 +0000 (16:53 -0800)]
glsl: Emit errors or warnings when 'layout' is used with 'attribute' or 'varying'
The specs that add 'layout' require the use of 'in' or 'out'.
However, a number of implementations, including Mesa, shipped several
of these extensions allowing the use of 'varying' and 'attribute'.
For these extensions only a warning is emitted.
This differs from the behavior of Mesa 7.10. Mesa 7.10 would only
accept 'attribute' with 'layout(location)'. This behavior was clearly
wrong. Rather than carrying the broken behavior forward, we're just
doing the correct thing.
This is related to (piglit) bugzilla #31804.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
Ian Romanick [Sat, 8 Jan 2011 00:53:07 +0000 (16:53 -0800)]
glsl: Allow 'in' and 'out' when 'layout' is also available
All of the extensions that add the 'layout' keyword also enable (and
required) the use of 'in' and 'out' with shader globals.
This is related to (piglit) bugzilla #31804.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
José Fonseca [Thu, 13 Jan 2011 20:52:01 +0000 (20:52 +0000)]
scons: Fix cross-compilation.
Hairy stuff. Don't know how to do it better though.
Christian König [Thu, 13 Jan 2011 20:29:47 +0000 (21:29 +0100)]
r600g: add missing RECIPSQRT_CLAMPED to r600_bc_get_num_operands
Christian König [Sat, 18 Dec 2010 16:56:36 +0000 (17:56 +0100)]
r600g: rework bank swizzle code
Christian König [Sat, 18 Dec 2010 12:57:18 +0000 (13:57 +0100)]
r600g: fix alu slot assignment
Christian König [Fri, 17 Dec 2010 23:45:59 +0000 (00:45 +0100)]
r600g: optimize away CF ALU instructions even if type doesn't match
Christoph Bumiller [Thu, 13 Jan 2011 18:36:25 +0000 (19:36 +0100)]
nvc0: identify POINT_RASTER_RULES, add POINT_SMOOTH state
Point smoothing requires rasterization rules to be set to OGL.
Sorry for the extra noise caused by the header update.
Chia-I Wu [Thu, 13 Jan 2011 17:50:51 +0000 (01:50 +0800)]
draw: Fix an off-by-one bug in a vsplit assertion.
When use_spoken is true, istart (the first vertex of this segment) is
replaced by i0 (the spoken vertex of the fan). There are still icount
vertices.
Thanks to Brian Paul for spotting this.
Vinson Lee [Thu, 13 Jan 2011 17:28:47 +0000 (09:28 -0800)]
i965: Remove unnecessary headers.
Vinson Lee [Thu, 13 Jan 2011 17:16:25 +0000 (09:16 -0800)]
targets/egl-static: Remove unnecessary header.
Vinson Lee [Thu, 13 Jan 2011 17:07:19 +0000 (09:07 -0800)]
r600g: Silence uninitialized variable warnings.
Vinson Lee [Thu, 13 Jan 2011 16:53:33 +0000 (08:53 -0800)]
mesa: Add missing break statement in SARGB8 case.
Brian Paul [Thu, 13 Jan 2011 16:25:55 +0000 (09:25 -0700)]
egl: need stdio.h for non-Windows build too to avoid compiler warning
Paulo Zanoni [Thu, 13 Jan 2011 12:59:12 +0000 (04:59 -0800)]
dri_util: fail driCreateNewScreen if InitScreen is NULL
Without this, X doesn't start with UMS on r300g.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
Signed-off-by: Paulo Zanoni <pzanoni@mandriva.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
José Fonseca [Thu, 13 Jan 2011 12:33:41 +0000 (12:33 +0000)]
scons: Ensure the OpenVG/EGL import libs are also prefixed with 'lib'.
José Fonseca [Thu, 13 Jan 2011 11:54:43 +0000 (11:54 +0000)]
scons: Build libOpenVG.dll & libEGL.dll
But without creating liblibOpenVG or liblibEGL elsewhere.
Thanks Chia-I Wu for pointing this out.
José Fonseca [Thu, 13 Jan 2011 11:45:40 +0000 (11:45 +0000)]
util: Undo spurious changes in last commit.
José Fonseca [Thu, 13 Jan 2011 11:44:16 +0000 (11:44 +0000)]
util: Don't limit debug_printf message length on unices.
Chia-I Wu [Wed, 12 Jan 2011 20:40:38 +0000 (04:40 +0800)]
egl: Improve driver selection.
The idea is to be able to match a driver using the following order
try egl_gallium with hw renderer
try egl_dri2
try egl_gallium with sw renderer
try egl_glx
given the module list
egl_gallium
egl_dri2
egl_glx
For that, UseFallback initialization option is added. The module list
is matched twice: with the option unset and with the option set. In the
first pass, egl_gallium skips its sw renderer and egl_glx rejects to
initialize since UseFallback is not set. In the second pass,
egl_gallium skips its hw renderer and egl_dri2 rejects to initialize
since UseFallback is set. The process stops at the first driver that
initializes the display.
Chia-I Wu [Wed, 12 Jan 2011 16:27:45 +0000 (00:27 +0800)]
egl: Simplify driver matching.
Add initialization options that drv->API.Initialize should support.
Replace drv->Probe by TestOnly initialization option and simplify
_eglMatchDriver.
Chia-I Wu [Thu, 13 Jan 2011 08:53:13 +0000 (16:53 +0800)]
egl: Cleanup _EGLDisplay initialization.
Reorder/rename and document the fields that should be set by the driver during
initialization. Drop the major/minor arguments from drv->API.Initialize.
Kenneth Graunke [Sat, 1 Jan 2011 20:43:03 +0000 (12:43 -0800)]
glsl/s_expression: Read and ignore Scheme-style comments.
A single-semicolon until the end of the line, i.e.
; this is a comment.
Kenneth Graunke [Sat, 1 Jan 2011 11:43:07 +0000 (03:43 -0800)]
glsl/builtins: Remove unnecessary (constant bool (1)) from assignments.
This isn't strictly necessary, but is definitely nicer.
Kenneth Graunke [Sat, 1 Jan 2011 11:37:02 +0000 (03:37 -0800)]
ir_reader: Make assignment conditions optional.
You can now simply write (assign (xy) <lhs> <rhs>) instead of the
verbose (assign (constant bool (1)) (xy) <lhs> <rhs>).
Kenneth Graunke [Sat, 1 Jan 2011 09:17:59 +0000 (01:17 -0800)]
ir_reader: Convert to a class.
This makes it unnecessary to pass _mesa_glsl_parse_state around
everywhere, making at least the prototypes a lot easier to read.
It's also more C++-ish than a pile of static C functions.
Kenneth Graunke [Fri, 31 Dec 2010 10:17:58 +0000 (02:17 -0800)]
ir_reader: Combine the three dereference reading functions into one.
These used to be more complicated, but now are so simple there's no real
point in keeping them separate.
Kenneth Graunke [Fri, 31 Dec 2010 10:03:21 +0000 (02:03 -0800)]
ir_reader: Relax requirement that function arguments be s_lists.
All of these functions used to take s_list pointers so they wouldn't all
need SX_AS_LIST conversions and error checking. However, the new
pattern matcher conveniently does this for us in one centralized place.
So there's no need to insist on s_list. Switching to s_expression saves
a bit of code and is somewhat cleaner.
Kenneth Graunke [Fri, 31 Dec 2010 09:48:02 +0000 (01:48 -0800)]
ir_reader: Remove s_list::length() method.
Most code now relies on the pattern matcher rather than this function,
and for the only remaining case, not using this saves an iteration.
Kenneth Graunke [Wed, 3 Nov 2010 19:47:06 +0000 (12:47 -0700)]
ir_reader: Add a pattern matching system and use it everywhere.
Previously, the IR reader was riddled with code that:
1. Checked for the right number of list elements (via a linked list walk)
2. Retrieved references to each component (via ->next->next pointers)
3. Downcasted as necessary to make sure that each sub-component was the
right type (i.e. symbol, int, list).
4. Checking that the tag (i.e. "declare") was correct.
This was all very ad-hoc and a bit ugly. Error checking had to be done
at both steps 1, 3, and 4. Most code didn't even check the tag, relying
on the caller to do so. Not all callers did.
The new pattern matching module performs the whole process in a single
straightforward function call, resulting in shorter, more readable code.
Unfortunately, MSVC does not support C99-style anonymous arrays, so the
pattern must be declared outside of the match call.
Dave Airlie [Thu, 13 Jan 2011 06:49:32 +0000 (16:49 +1000)]
mesa/srgb: handle SARGB8 case in the sw fbo renderer.
Fredrik Höglund [Thu, 6 Jan 2011 22:12:08 +0000 (23:12 +0100)]
st/mesa: fix a regression from
cae2bb76
stObj->pt is null when a TFP texture is passed to st_finalize_texture,
and with the changes introduced in the above commit this resulted in a
new texture being created and the existing image being copied into it.
NOTE: This is a candidate for the 7.10 branch.
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Ben Skeggs [Thu, 13 Jan 2011 05:25:37 +0000 (15:25 +1000)]
nvc0: disable calling of sw methods we don't implement
Left in the code as a marker of what NVIDIA do, just in case we need
to do this some day.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Dave Airlie [Thu, 13 Jan 2011 05:16:11 +0000 (15:16 +1000)]
mesa/fbo: prevent assert trigger on i965 with piglit fbo-srgb test.
Ben Skeggs [Thu, 13 Jan 2011 03:23:55 +0000 (13:23 +1000)]
nvc0: fix mp_stack_bo relocation
Fixes a PT_NOT_PRESENT error cause by:
- allocating in VRAM
- emitting GART relocs to 0x17bc/0x17c0, moving the buffer
- telling the bufmgr that the buffer should be in VRAM when we use it,
but not correcting the value sent to 0x17bc/0x17c0.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Vinson Lee [Thu, 13 Jan 2011 01:43:28 +0000 (17:43 -0800)]
mesa: Move loop variable declarations outside for loop in extensions.c.
Fixes MSVC build.
Brian Paul [Thu, 13 Jan 2011 01:14:14 +0000 (18:14 -0700)]
mesa: check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()
Fixes a failed assertion when a renderbuffer ID that was gen'd but not
previously bound was passed to glFramebufferRenderbuffer(). Generate
the same error that NVIDIA does.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
Brian Paul [Thu, 13 Jan 2011 01:12:46 +0000 (18:12 -0700)]
mesa: don't assert in GetIntegerIndexed, etc
We were getting an assertion upon invalid pname.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
Brian Paul [Thu, 13 Jan 2011 00:32:00 +0000 (17:32 -0700)]
mesa: fix num_draw_buffers==0 in fixed-function fragment program generation
This fixes a problem when glDrawBuffers(GL_NONE). The fragment program
was writing to color output[0] but OutputsWritten was 0. That led to a
failed assertion in the Mesa->TGSI translation code.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
Brian Paul [Wed, 12 Jan 2011 21:50:41 +0000 (14:50 -0700)]
st/mesa: add st_BeginQuery() case for GL_ANY_SAMPLES_PASSED
Fixes piglit occlusion_query2 failure.
Brian Paul [Wed, 12 Jan 2011 21:39:42 +0000 (14:39 -0700)]
glsl: remove trailing comma to silence warning
Brian Paul [Wed, 12 Jan 2011 21:39:24 +0000 (14:39 -0700)]
noop: change var type to silence warning
Kenneth Graunke [Thu, 13 Jan 2011 00:37:03 +0000 (16:37 -0800)]
glsl/Makefile: Fix build with --as-needed.
Vinson Lee [Thu, 13 Jan 2011 00:23:11 +0000 (16:23 -0800)]
mesa: Move declaration before code in extensions.c.
Fixes SCons build.
Chad Versace [Wed, 12 Jan 2011 23:21:23 +0000 (15:21 -0800)]
mesa: Change OES_point_sprite to depend on ARB_point_sprite
The extension string in GLES1 contexts always advertised
GL_OES_point_sprite. Now advertisement depends on ARB_point_sprite being
enabled.
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Chad Versace [Tue, 11 Jan 2011 22:56:13 +0000 (14:56 -0800)]
mesa: Change dependencies of some OES extension strings
Change all OES extension strings that depend on ARB_framebuffer_object to
instead depend on EXT_framebuffer_object.
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Chad Versace [Mon, 10 Jan 2011 05:53:52 +0000 (21:53 -0800)]
mesa: Add/remove extensions in extension string
Add GL_OES_stencil8 to ES2.
Remove the following:
GL_OES_compressed_paletted_texture : ES1
GL_OES_depth32 : ES1, ES2
GL_OES_stencil1 : ES1, ES2
GL_OES_stencil4 : ES1, ES2
Mesa advertised these extensions, but did not actually support them.
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Chad Versace [Sun, 9 Jan 2011 18:53:52 +0000 (10:53 -0800)]
mesa: Refactor handling of extension strings
Place GL, GLES1, and GLES2 extensions in a unified extension table. This
allows one to enable, disable, and query the status of GLES1 and GLES2
extensions by name.
When tested on Intel Ironlake, this patch did not alter the extension
string [as given by glGetString(GL_EXTENSIONS)] for any API.
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Sat, 8 Jan 2011 02:34:58 +0000 (18:34 -0800)]
glsl: Track variable usage, use that to enforce semantics
In particular, variables cannot be redeclared invariant after being
used.
Fixes piglit test invariant-05.vert and bugzilla #29164.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
Eric Anholt [Wed, 12 Jan 2011 20:52:16 +0000 (12:52 -0800)]
i965/fs: Do flat shading when appropriate.
We were trying to interpolate, which would end up doing unnecessary
math, and doing so on undefined values. Fixes glsl-fs-flat-color.
Christian König [Wed, 12 Jan 2011 19:39:40 +0000 (20:39 +0100)]
r600g: also look at tex inst when for maximum gpu count
Vinson Lee [Wed, 12 Jan 2011 19:35:43 +0000 (11:35 -0800)]
generate_builtins.py: Add missing import.
Import sys for sys.exit.
Eric Anholt [Wed, 12 Jan 2011 18:12:00 +0000 (10:12 -0800)]
meta: Actually use mipmapping when generating mipmaps.
With the change to not reset baselevel, this GL_LINEAR filtering was
resulting in generating mipmaps off of the base level instead of the
next higher detail level. Fixes fbo-generatemipmap-filtering.
Reported by: Neil Roberts <neil@linux.intel.com>
Eric Anholt [Wed, 12 Jan 2011 18:10:01 +0000 (10:10 -0800)]
i965: Clarify when we need to (re-)calculate live intervals.
The ad-hoc placement of recalculation somewhere between when they got
invalidated and when they were next needed was confusing. This should
clarify what's going on here.
Christian König [Thu, 16 Dec 2010 15:42:14 +0000 (16:42 +0100)]
r600g: implement output modifiers and use them to further optimize LRP
Christian König [Tue, 14 Dec 2010 22:38:30 +0000 (23:38 +0100)]
r600g: use special constants for 0, 1, -1, 1.0f, 0.5f etc
Christian König [Tue, 14 Dec 2010 19:49:31 +0000 (20:49 +0100)]
r600g: optimize temp register handling for LRP
Christian König [Mon, 13 Dec 2010 23:43:53 +0000 (00:43 +0100)]
r600g: optimize away CF_INST_POP
If last instruction is an CF_INST_ALU we don't need to emit an
additional CF_INST_POP for stack clean up after an IF ELSE ENDIF.
Christian König [Wed, 12 Jan 2011 18:02:03 +0000 (19:02 +0100)]
r600g: make dumping of shaders an option
Christian König [Fri, 17 Dec 2010 21:57:36 +0000 (22:57 +0100)]
r600g: fix alu dumping
Christian König [Thu, 16 Dec 2010 21:05:33 +0000 (22:05 +0100)]
r600g: improve r600_bc_dump
Eric Anholt [Wed, 12 Jan 2011 17:40:05 +0000 (09:40 -0800)]
i965/vs: When MOVing to produce ABS, strip negate of the operand.
We were returning the negative absolute value, instead of the absolute
value. Fixes glsl-vs-abs-neg.
Eric Anholt [Wed, 12 Jan 2011 17:37:07 +0000 (09:37 -0800)]
i965/fs: When producing ir_unop_abs of an operand, strip negate.
We were returning the negative absolute value, instead of the absolute
value. Fixes glsl-fs-abs-neg.
José Fonseca [Wed, 12 Jan 2011 16:58:37 +0000 (16:58 +0000)]
glsl: Make builtin_compiler build on Windows with MSVC.
José Fonseca [Wed, 12 Jan 2011 16:31:07 +0000 (16:31 +0000)]
glsl: Make builtin_compiler portable for non-unices.
José Fonseca [Wed, 12 Jan 2011 16:08:22 +0000 (16:08 +0000)]
getopt: Make code more portable.
José Fonseca [Wed, 12 Jan 2011 15:32:17 +0000 (15:32 +0000)]
getopt: Import OpenBSD getopt implementation for MSVC.
José Fonseca [Wed, 12 Jan 2011 15:13:57 +0000 (15:13 +0000)]
scons: Update windows build for vgapi->openvg rename.
José Fonseca [Wed, 12 Jan 2011 15:06:57 +0000 (15:06 +0000)]
scons: Fix build on systems without libOpenVG.so
Chia-I Wu [Wed, 12 Jan 2011 09:49:43 +0000 (17:49 +0800)]
egl: When EGL_DRIVER is set, do not add other drivers.
Setting EGL_DRIVER forces the driver to be loaded, as documented. There
should be no fallbacks.
Chia-I Wu [Wed, 12 Jan 2011 10:09:12 +0000 (18:09 +0800)]
egl: libEGL depends on LOCAL_LIBS.
So that libEGL is rebuilt whenever LOCAL_LIBS changes.
Chia-I Wu [Wed, 12 Jan 2011 10:06:47 +0000 (18:06 +0800)]
egl_dri2: Fix eglGetProcAddress.
The driver struct is zeroed after dri2_load. Oops.
Chia-I Wu [Sun, 9 Jan 2011 15:37:32 +0000 (23:37 +0800)]
scons: Updates for targets/egl-static.
Update SConscripts to re-enable or add support for EGL on windows and
x11 platforms respectively. targets/egl-gdi is replaced by
targets/egl-static, where "-static" means pipe drivers and state
trackers are linked to statically by egl_gallium, and egl_gallium is a
built-in driver of libEGL. There is no more egl_gallium.dll on Windows.
Chia-I Wu [Mon, 10 Jan 2011 04:39:46 +0000 (12:39 +0800)]
targets/egl-static: New EGL target for scons.
This target is based on and replaces egl-gdi. It is suitable for both
windows and x11.
Kenneth Graunke [Tue, 7 Dec 2010 00:00:24 +0000 (16:00 -0800)]
glsl: Add type inference support for remaining expression opcodes.
Eric Anholt [Tue, 11 Jan 2011 23:13:49 +0000 (15:13 -0800)]
i965: Tighten up the check for flow control interfering with coalescing.
This greatly improves codegen for programs with flow control by
allowing coalescing for all instructions at the top level, not just
ones that follow the last flow control in the program.
Christian König [Sun, 12 Dec 2010 14:37:54 +0000 (15:37 +0100)]
r600g: texture instructions also work fine with TGSI_FILE_INPUT
Christian König [Tue, 14 Dec 2010 18:32:08 +0000 (19:32 +0100)]
r600g: DP4 also supports writemasking
Christian König [Sun, 12 Dec 2010 14:13:39 +0000 (15:13 +0100)]
r600g: Why all this fiddling with tgsi_helper_copy?
tgsi_helper_copy is used on several occasions to copy a temporary result
into the real destination register to emulate writemasks for OP3 and
reduction operations. According to R600 ISA that's unnecessary.
This patch fixes this use for MAD, CMP and DP4.
Christian König [Thu, 16 Dec 2010 21:23:48 +0000 (22:23 +0100)]
r600g: fix tex and vtx joining
Eric Anholt [Tue, 11 Jan 2011 22:50:19 +0000 (14:50 -0800)]
glsl: Fix the lowering of variable array indexing to not lose write_masks.
Fixes glsl-complex-subscript on 965.
Eric Anholt [Tue, 11 Jan 2011 21:34:40 +0000 (13:34 -0800)]
i965: Remove dead fallback for stencil _Enabled but no stencil buffer.
The _Enabled field is the thing that takes into account whether
there's a stencil buffer. Tested with piglit glx-visuals-stencil.
Tilman Sauerbeck [Thu, 6 Jan 2011 20:35:19 +0000 (21:35 +0100)]
r600g: Fixed SIN/COS/SCS for the case where the operand is a literal.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Alberto Milone [Thu, 2 Dec 2010 12:34:35 +0000 (13:34 +0100)]
r600c: add evergreen ARL support.
Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
Jerome Glisse [Tue, 11 Jan 2011 19:46:09 +0000 (14:46 -0500)]
noop: remove dead dri target
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Jerome Glisse [Tue, 11 Jan 2011 19:29:33 +0000 (14:29 -0500)]
r600g: move user fence into base radeon structure
This avoid any issue when context is free and we still try to
access fence through radeon structure.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Brian Paul [Tue, 11 Jan 2011 16:42:52 +0000 (09:42 -0700)]
configure: bump libdrm version requirement to 2.4.23
NOTE: This is a candidate for the 7.10 (and 7.9?) branch.
Brian Paul [Tue, 11 Jan 2011 16:37:35 +0000 (09:37 -0700)]
mesa: include teximage.h to silence warning
Brian Paul [Tue, 11 Jan 2011 16:26:03 +0000 (09:26 -0700)]
mesa: do a debug check of _mesa_format_to_type_and_comps()
Make sure that all formats are handled in this function. It's
easy to miss this function when adding new pixel formats.
See also http://bugs.freedesktop.org/show_bug.cgi?id=31544
Brian Paul [Tue, 11 Jan 2011 16:23:45 +0000 (09:23 -0700)]
mesa: fix a few format table mistakes, assertions
The BaseFormat field was incorrect for a few R and RG formats.
Fix a couple assertions too.
NOTE: This is a candidate for the 7.9 and 7.10 branches.
Kenneth Graunke [Fri, 7 Jan 2011 22:30:14 +0000 (14:30 -0800)]
glsl: Autogenerate builtin_functions.cpp as part of the build process.
Python is already necessary for other parts of Mesa, so there's no
reason we can't just generate it. This patch updates both make and
SCons to do so.
Ian Romanick [Sat, 8 Jan 2011 00:05:59 +0000 (16:05 -0800)]
glsl: Disallow 'in' and 'out' on globals in GLSL 1.20
Fixes piglit tests glsl-1.20/compiler/qualifiers/in-01.vert and
glsl-1.20/compiler/qualifiers/out-01.vert and bugzilla #32910.
NOTE: This is a candidate for the 7.9 and 7.10 branches. This patch
also depends on the previous two commits.
Ian Romanick [Sat, 8 Jan 2011 00:04:30 +0000 (16:04 -0800)]
glsl: Refresh autogenerated parser file.
For the previous commit.
Ian Romanick [Sat, 8 Jan 2011 00:03:48 +0000 (16:03 -0800)]
glsl: Add version_string containing properly formatted GLSL version
Ian Romanick [Tue, 11 Jan 2011 01:38:56 +0000 (17:38 -0800)]
glcpp: Refresh autogenerated lexer and parser files.
For the previous commit.
Ian Romanick [Mon, 10 Jan 2011 21:33:07 +0000 (13:33 -0800)]
glcpp: Generate an error for division by zero
When GCC encounters a division by zero in a preprocessor directive, it
generates an error. Since the GLSL spec says that the GLSL
preprocessor behaves like the C preprocessor, we should generate that
same error.
It's worth noting that I cannot find any text in the C99 spec that
says this should be an error. The only text that I can find is line 5
on page 82 (section 6.5.5 Multiplicative Opertors), which says,
"The result of the / operator is the quotient from the division of
the first operand by the second; the result of the % operator is
the remainder. In both operations, if the value of the second
operand is zero, the behavior is undefined."
Fixes 093-divide-by-zero.c test and bugzilla #32831.
NOTE: This is a candidate for the 7.9 and 7.10 branches.