Commit Graph
370 Commits
Author SHA1 Message Date
[email protected] 0a57618aa9 Reject shaders that invoke functions hidden by variable or struct name.
BUG=22
Review URL: http://codereview.appspot.com/1855057

git-svn-id: https://angleproject.googlecode.com/svn/trunk@375 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-08-09 17:16:27 +00:00
[email protected] 003e7b135a We were trying to change a const_iterator which was rightly caught by SunStudio compiler. Submitted by Eagle.Lu.
BUG=19
Review URL: http://codereview.appspot.com/1879049

git-svn-id: https://angleproject.googlecode.com/svn/trunk@374 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-08-09 17:14:46 +00:00
[email protected] 5223af6b27 Replaced __inline with inline to make it compile with SunStudio compiler. Submitted by Eagle.Lu.
BUG=19
Review URL: http://codereview.appspot.com/1910047

git-svn-id: https://angleproject.googlecode.com/svn/trunk@373 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-08-09 17:14:09 +00:00
[email protected] f8de41fb6b Adding separate license file for the preprocessor code and removing the ANGLE boilerplate license from those files.
git-svn-id: https://angleproject.googlecode.com/svn/trunk@372 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-08-09 16:51:37 +00:00
[email protected] 5783308ef9 Add Al and Vlad to contributors file
git-svn-id: https://angleproject.googlecode.com/svn/trunk@371 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-08-08 04:50:02 +00:00
[email protected] a9198d9c6f Implement EXT_texture_format_BGRA8888 and EXT_read_format_bgra
Trac #13050, Issue=21
Original Author: Vladimir Vukicevic
Signed-off-by: Daniel Koch

git-svn-id: https://angleproject.googlecode.com/svn/trunk@370 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-08-08 04:49:56 +00:00
[email protected] bc3699da7c Implements fixes for problems discovered running San Angeles demo on Chrome
TRAC #13077
 - clamp scissor to rendertarget size
 - ensure textures are renderable when required
Signed-off-by: Daniel Koch

Author:    Shannon Woods

git-svn-id: https://angleproject.googlecode.com/svn/trunk@369 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-08-05 14:48:49 +00:00
[email protected] 31273558e8 Fixes erroneous copy in subImage calls after failure is already detected.
TRAC #13074
Also adds initializations for missed Texture members.
Signed-off-by: Daniel Koch

Author:    Shannon Woods

git-svn-id: https://angleproject.googlecode.com/svn/trunk@368 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-08-04 13:42:44 +00:00
[email protected] 257e8d0f82 Added missing sources to build_angle.gyp.
Review URL: http://codereview.appspot.com/1907043

git-svn-id: https://angleproject.googlecode.com/svn/trunk@367 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-28 23:07:39 +00:00
[email protected] 37fa3c8eee Removes Windows-style line endings from Display.cpp
TRAC #12714
Signed-off-by: Daniel Koch

Author:    Shannon Woods

git-svn-id: https://angleproject.googlecode.com/svn/trunk@366 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-28 19:21:21 +00:00
[email protected] da6e263ced Support window resizing
TRAC #12660

Automatically resize the D3D swap chain when the eglSwapBuffers is called and the presentation window has changed size.
Also change D3D device init to be performed once when the Display is created using a hidden 1x1 window.

Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch

Author:    Andrew Lewycky

git-svn-id: https://angleproject.googlecode.com/svn/trunk@365 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-28 19:21:18 +00:00
[email protected] 9ecb9f9d50 Sharing for buffer, texture and renderbuffer objects.
TRAC #12496

Derive Renderbuffer, Texture and Buffer from RefCountObject.
This class keeps a reference count for all objects that need cross-context
reference counting, and also the object id.
Restructure Renderbuffers to create a wrapper object and a storage object.
Use BindingPointer for all binding points instead of binding by object id.

Signed-off-by: Shannon Woods
Signed-off-by: Daniel Koch

git-svn-id: https://angleproject.googlecode.com/svn/trunk@364 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-28 19:21:12 +00:00
[email protected] 0d25b005e3 Create shared contexts.
TRAC #12498

Signed-off-by: Shannon Woods
Signed-off-by: Daniel Koch

Author:    Andrew Lewycky

git-svn-id: https://angleproject.googlecode.com/svn/trunk@363 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-28 19:21:07 +00:00
[email protected] bbc57796e8 Checks completeness of framebuffer before read operations.
TRAC #12565
Signed-off-by: Andrew Lewycky
Signed-off-by: Daniel Koch

Author:    Shannon Woods

git-svn-id: https://angleproject.googlecode.com/svn/trunk@362 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-28 19:21:05 +00:00
[email protected] 0190f84563 Fixes FBO completeness check
TRAC #12571
Automatically passes default framebuffer, and fails
framebuffers which have no color attachments.
Signed-off-by: Andrew Lewycky
Signed-off-by: Daniel Koch

Author:    Shannon Woods

git-svn-id: https://angleproject.googlecode.com/svn/trunk@361 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-28 19:21:02 +00:00
[email protected] da13f3e902 Adds resource manager class.
TRAC #12493
The resource manager class is now in charge of allocation &
management of objects which may be shared by multiple contexts.
Signed-off-by: Andrew Lewycky
Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch

Author:    Shannon Woods

git-svn-id: https://angleproject.googlecode.com/svn/trunk@360 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-28 19:20:56 +00:00
[email protected] 9930531afd Remove wrong and unnecessary check attribute check.
TRAC #12580

Wrong because it should be checking active attributes, not inactive attributes.
Unnecessary because when a buffer is deleted, all the vertex attrib client state bindings are cleared.

Signed-off-by: Shannon Woods
Signed-off-by: Daniel Koch

Author:    Andrew Lewycky

git-svn-id: https://angleproject.googlecode.com/svn/trunk@359 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-28 19:20:54 +00:00
[email protected] cdacc8e271 Implement GL_OES_packed_depth_stencil
TRAC #12336
Signed-off-by: Andrew Lewycky
Signed-off-by: Daniel Koch

Author:    Shannon Woods

git-svn-id: https://angleproject.googlecode.com/svn/trunk@358 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-28 19:20:50 +00:00
[email protected] 162267d63a fix spacing issue due to manual merge
git-svn-id: https://angleproject.googlecode.com/svn/trunk@357 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-28 19:20:48 +00:00
[email protected] 4f921eb4e6 Renamed dx_Window to dx_Viewport
TRAC #11594
Signed-off-by: Daniel Koch

Author:    Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/trunk@356 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-28 19:20:44 +00:00
[email protected] be5a0867c4 Implement gl_PointCoord on SM3 hardware
TRAC #11594
Signed-off-by: Andrew Lewycky
Signed-off-by: Daniel Koch

Author:    Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/trunk@355 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-28 19:20:37 +00:00
[email protected] b75e523ab1 Use TestCooperativeLevel instead of ValidateDevice to check for device loss.
TRAC #12547

ValidateDevice checks for correct rendering state as well, which we don't need.

Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch

Author:    Andrew Lewycky

git-svn-id: https://angleproject.googlecode.com/svn/trunk@354 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-28 19:13:47 +00:00
[email protected] 34b99cdf6c De-allocate memory in ShFinalize(). There still seems to be a bug here if the translator is used in a multi-threaded environment. It seems memory local to only one thread is being deallocated - the thread from which ShFinalize() is called. I will look into it closely in the next CL.
Review URL: http://codereview.appspot.com/1878044

git-svn-id: https://angleproject.googlecode.com/svn/trunk@353 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-27 18:37:55 +00:00
[email protected] 5eb4609cd0 Encapsulate expressions with ternary operators with brackets. This preserves the order of precedence when ternary expressions are used in a compound expression.
BUG=20
Review URL: http://codereview.appspot.com/1894041

git-svn-id: https://angleproject.googlecode.com/svn/trunk@352 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-26 18:15:21 +00:00
[email protected] e4249f0217 Refactored the way symbol tables are initialized and stored. This was done in response to the addition of EShSpec.
Symbol table entries depend on three things - language, spec (not now but may eventually), and built-in resources.
We used to build two global symbol-tables - one for each language. During each compile, one of the symbol table was
copied and resource-specific stuff was added. I have moved the symbol table to TCompiler that gets initilized when
compiler is created and reused for each compile. This makes it much cleaner and extensible in case a spec requires
special entries to be added to the symbol table.

PS: Sorry for the long CL, but all of it needed to be done in one CL. I have verified that everything still compiles
and passes all conformance tests.
Review URL: http://codereview.appspot.com/1864044

git-svn-id: https://angleproject.googlecode.com/svn/trunk@351 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-26 18:13:52 +00:00
[email protected] 6db8cab4b8 ReadPixels recovers from device lost error.
I found that when I switch desktops, GetRenderTargetData will return D3DERR_DEVICELOST. It is unclear to me whether ReadPixels should report a GL error in this case and if so, which one. I went with GL_OUT_OF_MEMORY. Let me know if that's wrong.

This change is not sufficient to make eglGetError report EGL_CONTEXT_LOST. For a program doing exclusively offscreen rendering, ReadPixels might be the only place where D3DERR_DEVICELOST can be detected. The GLES code can't call egl::setCurrentError though. I'm not sure how to fix that.




Review URL: http://codereview.appspot.com/1692053

git-svn-id: https://angleproject.googlecode.com/svn/trunk@350 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-22 20:39:50 +00:00
[email protected] c54bf507cd Further cleanup of ShaderLang.h. Removed redundant/unused macros and enum fields.
Review URL: http://codereview.appspot.com/1842046

git-svn-id: https://angleproject.googlecode.com/svn/trunk@349 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-22 16:49:09 +00:00
[email protected] 774d70630a Cleaned up translator API. Deleted unsupported dead code.
BUG=9
Review URL: http://codereview.appspot.com/1665050

git-svn-id: https://angleproject.googlecode.com/svn/trunk@348 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-21 18:55:45 +00:00
[email protected] a300988e45 Check for reserved prefixes (gl_, webgl_, and _webgl_) in struct and field names. GLES2 and WebGL both require this for all identifiers - variable, function, struct, and field names. ANGLE was only validating variable and function names.
BUG=11
Review URL: http://codereview.appspot.com/1856046

git-svn-id: https://angleproject.googlecode.com/svn/trunk@347 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-21 18:54:37 +00:00
[email protected] 613ef31a9f Added checks for webgl_ and _webgl_ reserved identifiers. This currently only checks variable and function names. Struct names and field names will be added in the another CL.
BUG=11
Review URL: http://codereview.appspot.com/1674050

git-svn-id: https://angleproject.googlecode.com/svn/trunk@346 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-21 18:54:22 +00:00
[email protected] bad6c2a42b Added <stdio.h> include for sprintf. It broke Chrome downstream when I bumped the rev.
Review URL: http://codereview.appspot.com/1879042

git-svn-id: https://angleproject.googlecode.com/svn/trunk@345 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-20 20:19:51 +00:00
[email protected] 29cd91af30 Added an option for specifying language specification in preparation for supporting WebGL in addition to GLES2. This CL just replaces unused debugOptions variable with EShSpec variable.
BUG=11
Review URL: http://codereview.appspot.com/1692051

git-svn-id: https://angleproject.googlecode.com/svn/trunk@344 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-16 19:30:45 +00:00
[email protected] 01b666f225 Fixed compilation error on mingw. Used _MSC_VER for MSVC-specific code instead of WIN32. Recieved patch from cjacek.
BUG=12
Review URL: http://codereview.appspot.com/1694049

git-svn-id: https://angleproject.googlecode.com/svn/trunk@343 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-07-16 19:27:45 +00:00
[email protected] 9abe956ea6 Removed the precision check creating spurious error messages
TRAC #12641
The precision of compiler temporaries doesn't require checking,
and would be hard to determine at parse time. We only require
correct precisions for declarations, which is checked separately.
So we can safely remove the check for binary operations.

Signed-off-by: Daniel Koch

Author:    Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/trunk@342 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-24 13:02:21 +00:00
[email protected] c6f5340070 Clear must ignore buffers that are not present.
TRAC #12643

IDirect3DDevice9::Clear will fail if asked to clear a buffer that is not present, so we have to be careful what we pass to it.

Signed-off-by: Shannon Woods
Signed-off-by: Daniel Koch

Author:    Andrew Lewycky

git-svn-id: https://angleproject.googlecode.com/svn/trunk@341 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-24 13:02:19 +00:00
[email protected] 4c03fa69a3 Fix NPOT completeness rule.
TRAC #12561

Signed-off-by: Shannon Woods
Signed-off-by: Daniel Koch

Author:    Andrew Lewycky

git-svn-id: https://angleproject.googlecode.com/svn/trunk@340 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-24 13:02:16 +00:00
[email protected] 353569a9ca Eliminates redundant calls to GetDeviceCaps
TRAC #12283
Signed-off-by: Daniel Koch

Author:    Shannon Woods

git-svn-id: https://angleproject.googlecode.com/svn/trunk@339 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-24 13:02:12 +00:00
[email protected] 8187fa8f13 Added some includes.
My Unbuntu 10.04 gcc configuration seems to need <stdio.h> to use some of the string printf functions like vsnprintf.
The translator is building for me now.

Review URL: http://codereview.appspot.com/1717041

git-svn-id: https://angleproject.googlecode.com/svn/trunk@337 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-15 22:09:28 +00:00
[email protected] cba04990ec Added parentheses around a few operators so that if they are used in a compound statement, order of operations is preserved.
BUG=5
TEST=OpenGL ES 2.0 conformance tests.
Review URL: http://codereview.appspot.com/1691041

git-svn-id: https://angleproject.googlecode.com/svn/trunk@336 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-14 20:36:41 +00:00
[email protected] 334aa1f359 Handled case where selection nodes that use ternary operators are part of a sequence. Usually they are part of an assignment.
BUG=4
TEST=OpenGL ES 2.0 conformance tests, specifically operators test.
Review URL: http://codereview.appspot.com/1643043


git-svn-id: https://angleproject.googlecode.com/svn/trunk@335 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-11 23:38:29 +00:00
[email protected] 7d3849bd7c Fix build when a project patch contains spaces
Trac #11553

With improvements so it works in release mode and on Win7 as well.

Original-Author: Jim Hauxwell

git-svn-id: https://angleproject.googlecode.com/svn/trunk@334 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-08 16:07:55 +00:00
[email protected] 306cc952a0 Workaround for drivers that apparently don't disable instancing when we ask.
TRAC #12479

This affects text rendering in Nexuiz.
The text will be drawn as if the colour attribute is static rather than array,
and all text will be drawn using the shadow colour.

Signed-off-by: Shannon Woods
Signed-off-by: Daniel Koch

Author:    Andrew Lewycky

git-svn-id: https://angleproject.googlecode.com/svn/trunk@333 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-08 16:07:47 +00:00
[email protected] 1c233ff444 Increase the number of supported attribs (12) and texture units (16)
TRAC #12313
Signed-off-by: Andrew Lewycky
Signed-off-by: Daniel Koch

Author:    Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/trunk@332 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-08 14:13:00 +00:00
[email protected] b0a1dcccf6 Fix regression due to float printing changes
Trac #12501

This was caused by the change from printf to iostream printing.
Sets the float formatting to "default" which is neither fixed or scientific and request 8 digits of precision.
This appears to be mostly equivalent to the previous "%.8g".
If the non-fractional case, we set it to fixed and use 1 unit of precision after the decimal.

Signed-off-by: Andrew Lewycky
Signed-off-by: Shannon Woods
Signed-off-by: Ken Russell

git-svn-id: https://angleproject.googlecode.com/svn/trunk@331 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-07 02:06:26 +00:00
[email protected] fce644e28e Don't rely on (potentially) unsupported vertex attribute types.
TRAC #11391
Checks for optional vertex declaration formats and falls back to FLOAT1-4 if more direct formats are not supporte

Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch

Author:    Andrew Lewycky

git-svn-id: https://angleproject.googlecode.com/svn/trunk@330 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-07 02:06:20 +00:00
[email protected] a3bbfd43fe Fixes double-decoration when getUniformLocation is called from defineUniform.
TRAC #12437

This fixes the WebGL Teapot Per Pixel sample rendering

Signed-off-by: Andrew Lewycky
Signed-off-by: Daniel Koch

Author:    Shannon Woods

git-svn-id: https://angleproject.googlecode.com/svn/trunk@329 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-07 02:06:09 +00:00
[email protected] 8f05d1aa87 Save D3D state before altering it for masked clears
TRAC #12380
Signed-off-by: Andrew Lewycky
Signed-off-by: Daniel Koch

Author:    Shannon Woods

git-svn-id: https://angleproject.googlecode.com/svn/trunk@328 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-07 02:06:03 +00:00
[email protected] 9c212cae5f Fixed warnings in release build. Trace was not defined properly.
Review URL: http://codereview.appspot.com/1484041

git-svn-id: https://angleproject.googlecode.com/svn/trunk@327 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-02 22:53:00 +00:00
[email protected] 84a9628864 Moved windows-only targets into OS==win conditional.
Review URL: http://codereview.appspot.com/1473043

git-svn-id: https://angleproject.googlecode.com/svn/trunk@325 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-02 22:26:52 +00:00
[email protected] dd7948b3ae According to spec, the stencil ref is clamped to the range [0,2^s-1]
The clamp to zero occurs on set since negative values will never be useful.
The clamp to 2^s - 1 occurs on use since it is dependant on the currently bound stencil buffer

Original-Author: Jim Hauxwell <[email protected]>
Signed-off-by: Daniel Koch

git-svn-id: https://angleproject.googlecode.com/svn/trunk@324 736b8ea6-26fd-11df-bfd4-992fa37f6226
2010-06-02 16:12:34 +00:00