src


Log

Author Commit Date CI Message
daniel@transgaming.com 458da14d 2010-11-28T02:03:02 Increase the number of fragment uniform vectors. TRAC #14504 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@497 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 265f4507 2010-11-28T02:02:58 Increase the number of vertex uniform vectors. TRAC #14504 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@496 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 3175496d 2010-11-28T02:02:52 Implement gl_DepthRange using a single uniform vector. TRAC #14504 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@495 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com ce9952c5 2010-11-28T02:02:47 Increase the number of supported vertex attributes. TRAC #14504 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@494 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com beb2a273 2010-11-26T16:26:16 Render directly to a render target texture. TRAC #14506 This speeds up surface swapping by avoiding an unnecessary StretchRect from a render target surface to a render target texture (anti-aliased surfaces are unsupported so no resolve is needed). Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@493 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 396c643d 2010-11-26T16:26:12 Increase the number of varying vectors to 10 on Shader Model 3.0 devices. TRAC #14503 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@492 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org b59a778c 2010-11-24T18:38:33 Implemented validation for loop and indexing limitations specified by GLSL ES spec 1.0 Appendix A Section 4 and 5. A couple of things to note: - This CL only validates the "form" of loop and indexing. It does not detect number-of-iterations or out-of-bound access. This will require more involved analysis/heuristics. - I haved combined SH_VALIDATE_CONTROL_FLOW and SH_VALIDATE_INDEXING into one flag - SH_VALIDATE_LOOP_INDEXING. Validating both together is much easier. BUG=48 Review URL: http://codereview.appspot.com/3225041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@491 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 9d1c9b4b 2010-11-23T22:05:41 glGenerateMipmap now does not force textures to become render targets. For textures that are not already render targets, use the CPU to filter them and mark them as dirty. I tested it by modifying the "mip_map_2d" demo to call glGenerateMipmap instead of generating the mipmaps itself. I also used the debugger to force it to take the render target path and verified that it still worked. We've been having problems with the display being reset when video memory pressure is heavy with one of our demos. This patch made a noticable improvement on Vista but I don't think it will necessarily help on XP. Review URL: http://codereview.appspot.com/3262041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@490 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org bafcbaa3 2010-11-23T19:07:43 Moved the global-pool-allocator to TCompiler so that all memory allocated by the compiler can be de-allocated. Earlier the global-pool-allocator kept accumulating memory from all compilers (symbol-table in particular). The memory was only de-allocated when gpu-process exited or ShFinalize() was called. This was a problem for Chromium which keeps the GPU process around for the browser session. Now the memory is de-allocated as soon as the compiler is deleted, which happens when a tab is closed. BUG=58808 (crbug.com) Review URL: http://codereview.appspot.com/3280041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@489 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com a5a8a0ad 2010-11-19T14:55:32 Fix active texture handling. TRAC #14429 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@488 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com ce864420 2010-11-18T13:16:49 Add an array index to arrays of structures. TRAC #13625 This patch ensures that (member variables of) arrays of structures are listed separately by glGetActiveUniforms(). Their location can also be retrieved individually with glGetUniformLocation() using the array operator. Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@487 736b8ea6-26fd-11df-bfd4-992fa37f6226
nduca@chromium.org a6e31e58 2010-11-18T00:24:27 Resize surface on receipt of WM_SIZE to avoid corruption during resize. We hook WM_SIZE using window subclassing. This is a continuation of http://codereview.appspot.com/3038042/ Review URL: http://codereview.appspot.com/3122041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@486 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 3a053f26 2010-11-17T21:39:54 Removed actions for generating parser-lexer now that they have been checked in. Also removed hooks to pull cygwin - it was only required for flex and bison that are not required anymore. If a developer needs to modify grammar files, he is expected to install cygwin. Review URL: http://codereview.appspot.com/3177042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@485 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org b3abc78b 2010-11-17T21:31:59 Fixed compile error introduced in r482. git-svn-id: https://angleproject.googlecode.com/svn/trunk@484 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 996675c6 2010-11-17T13:06:29 Fixed skipping over internal uniforms in getActiveUniform. TRAC #14390 Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/trunk@483 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 52813558 2010-11-16T18:36:09 Replaced TIntermLoop::testFirst with TIntermLoop::loopType to clearly indicate which type of loop it is. In some cases it is not possble to differentiate between a for-loop and while-loop. BUG=48 Review URL: http://codereview.appspot.com/3123041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@482 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 9c857952 2010-11-16T18:27:58 Made GL_RGB textures map to D3DFMT_X8R8G8B8. I suspect there is a subtle reason why this is the wrong thing to do. The issue I am trying to address is glBlitFramebufferANGLE generating an error when bliting from a GL_RGB8_OES renderbuffer to a GL_RGB texture bound to the read framebuffer and draw framebuffer respectively. It verifies that both surfaces have the same underlying D3DFMT but GL_RGB8_OES renderbuffers are backed by X8R8G8B8 and GL_RGB textures were previously backed by A8R8G8B8. Since textures cannot as far as I know be created GL_RGB8_OES, it would be useful to have a way to blit from a GL_RGB8_OES renderbuffer to a GL_RGB texture. Review URL: http://codereview.appspot.com/2822041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@481 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org f99fbb77 2010-11-16T01:57:05 Check that IDirect3DVertexBuffer9 and IDirect3DIndexBuffer9::Lock succeed. I've been seeing crashes like this on Windows XP: 0x013319aa [libglesv2.dll - memcpy.asm:188] memcpy 0x0130989a [libglesv2.dll - vertexdatamanager.cpp:164] gl::VertexDataManager::preRenderValidate(int,int,gl::TranslatedAttribute *) 0x01304f66 [libglesv2.dll - context.cpp:1996] gl::Context::applyVertexBuffer(unsigned int,int,int,bool *,gl::TranslatedIndexData *) 0x013061a7 [libglesv2.dll - context.cpp:2648] gl::Context::drawArrays(unsigned int,int,int) 0x012f7721 [libglesv2.dll - libglesv2.cpp:1741] glDrawArrays 0x01c54f1e [chrome.dll - gles2_cmd_decoder.cc:3179] gpu::gles2::GLES2DecoderImpl::DoDrawArrays(unsigned int,int,int) 0x01c59122 [chrome.dll - gles2_cmd_decoder_autogen.h:640] gpu::gles2::GLES2DecoderImpl::HandleDrawArrays(unsigned int,gpu::gles2::DrawArrays const &) Review URL: http://codereview.appspot.com/3043042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@480 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com bdfb2e50 2010-11-15T16:41:20 Only initialize through a temporary variable if the same symbol name is used in the initialization expression. TRAC #13627 The previous patch can generate a lot of unnecessary temporary variables. By first checking whether the same symbol name is reused the clutter is reduced to an absolute minimum (typical shaders won't rely on this odd GLSL semantic behavior so the workaround is hardly ever needed). Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@479 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com b6ef8f11 2010-11-15T16:41:14 Define new variables after evaluating the initialization expression. TRAC #13627 GLSL allows to write things like "float x = x;" where a new variable x is defined and the value of an existing variable x is assigned. HLSL uses C semantics (the new variable is created before the assignment is evaluated), so we need to convert this to "float t = x, x = t;". Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@478 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 1f29954d 2010-11-12T15:50:23 Added API to enforce GLSL limitations mandated by WebGL. BUG=48 Review URL: http://codereview.appspot.com/3005042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@476 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 044a5cf8 2010-11-12T15:42:16 Refactored glslang grammar files to make: - lexer and parser reentrant - line number handling automatic Caveats: - The preprocessor is still not thread-safe and full of bugs. I have another not-yet-ready patch to replace the preprocessor. - The grammar files use options that are not supported by the old versions of flex and bison checked into compiler/tools. So I need to check-in the generated lexer-parser along with a shell script to generate them. Review URL: http://codereview.appspot.com/2992041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@475 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 2dfc47e3 2010-11-08T13:45:24 Fix ternary operator unfolding TRAC #14155 Issue=70 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@474 736b8ea6-26fd-11df-bfd4-992fa37f6226
kbr@chromium.org 72d58c4c 2010-11-05T22:55:28 Fixed gl_FragCoord emulation for point sprites of size > 1 using VPOS semantic for x and y coordinates rather than previous per-vertex emulation when running on Shader Model 3. Verified fix in Chromium with test case from bug. BUG=http://code.google.com/p/angleproject/issues/detail?id=71 TEST=test case from bug TBR=nicolas (LGTM'd by dgkoch) Review URL: http://codereview.appspot.com/2921041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@473 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 74d760bc 2010-11-03T12:27:18 Preserve the scissor and viewport rectangles on swap and blit TRAC #14054 The SetRenderTarget calls used in Blit::boxFilter() and Surface::swap() implicitly reset the scissor and viewport rectangles. So we need to ensure that the original rectangles get captured, and restored afterwards (the Context only keeps track of explicitly changed state). Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/trunk@472 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 24e39699 2010-11-01T21:19:43 Fixed null dereference when null passed as attribute list to eglCreateContext. I tested that the samples still work and that they fail as expected, but do not crash, if the attribute list argument is null. Review URL: http://codereview.appspot.com/2725042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@471 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 91ed1494 2010-10-29T03:11:43 Use C locale for atof to ensure using a dot as decimal mark. TRAC #14055 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@470 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 8860909e 2010-10-27T19:42:44 Fixed infinite loops and buffer overflow in byte_scan when scanning for integers and floating-point numbers. - The byte_scan and associated functions are not very well written. I tried to clean them as much as possible without re-writing the whole thing. - Replaced lBuildFloatValue function with atof. lBuildFloatValue was returning incorrect value anyway. The only reason it was working so far because we never used that value. BUG=59623(crbug.com), 603333(bugzilla.mozilla.org) Review URL: http://codereview.appspot.com/2655042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@469 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 78477fc0 2010-10-27T17:57:14 eglCreateContext checks client version is 2. I believe we don't support version 1 since we are missing things like the fixed function pipeline. This is motivated by consistency with other EGL implementations, which return a v1 context if the EGL_CONTEXT_CLIENT_VERSION attribute is not specified. Review URL: http://codereview.appspot.com/2760041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@468 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 9d7fc1db 2010-10-27T15:49:42 Add missing break statements to Context::getBooleanv Trac #14114 Reported in Bug=69 Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@467 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org f5855c5e 2010-10-21T16:31:18 We were not reporting anything in the info-log for empty shader. This CL reports "unexpected EOF". BUG=66 Review URL: http://codereview.appspot.com/2619041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@466 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 43668cd0 2010-10-20T20:55:53 Fixed stack overflow in CPPextension function. An arbitrary size buffer was being used for extension name. Changed it to use MAX_SYMBOL_NAME_LEN. - Also formalized the values for MAX_SYMBOL_NAME_LEN and MAX_STRING_LEN. They were being used as if there was a confusion whether it included the NULL terminator or not. - Fixed some minor issues with code releated to the usage of MAX_SYMBOL_NAME_LEN and MAX_STRING_LEN. BUG=59625 (crbug.com) Review URL: http://codereview.appspot.com/2585042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@464 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com fe5141ea 2010-10-18T12:18:12 Support copying R5G6B5 to L8. TRAC #13792 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@463 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com dd438af8 2010-10-18T12:18:06 Removed an unnecessary call. TRAC #13792 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@462 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 4c5142c6 2010-10-15T17:58:27 Implemented glCopyTex[Sub]Image for non-renderable formats. TRAC #13792 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@461 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 73a5db67 2010-10-15T17:58:13 Initialize renderbuffer variables. Make serials constant. Removed X1R5G5B5 support. TRAC #13792 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@460 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 3f85fbbc 2010-10-15T17:58:05 Validate glCopyTex[Sub]Image source and destination format combinations. TRAC #13792 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@459 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com edc19189 2010-10-15T17:57:55 Validate framebuffer attachment formats. TRAC #13792 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@458 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com b6b2e677 2010-10-15T17:57:47 Disallow rendering to L/LA textures. TRAC #13792 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@457 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 11cb68cb 2010-10-15T17:57:40 Create and load L/LA textures. TRAC #13792 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@456 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com ed828e5b 2010-10-15T17:57:30 Detect L8 and A8L8 texture support. TRAC #13792 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@455 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org fafd033e 2010-10-14T18:20:24 Added NSPR support for thread-local storage. Patch submitted by vladimirv. I have slightly modified the patch to still define ANGLE_OS_WIN and ANGLE_OS_POSIX. BUG=54 Review URL: http://codereview.appspot.com/2497041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@454 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org d300f5b0 2010-10-14T16:10:20 Removed redundant null-check. Patch submitted by timeless. BUG=58 Review URL: http://codereview.appspot.com/2470042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@453 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 18895cb1 2010-10-14T16:09:57 Initialized TPoolAllocator::totalBytes. Patch submitted by timeless. BUG=60 Review URL: http://codereview.appspot.com/2494041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@452 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 95447df0 2010-10-14T16:09:37 GLSL backend was assuming that a for-loop will always have a condition. But according to GLSL ES 1.0, the condition is optional. BUG=50 Review URL: http://codereview.appspot.com/2489042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@451 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org ac23189b 2010-10-14T16:09:09 Removed redundant dereference. Patch submitted by timeless. BUG=64 Review URL: http://codereview.appspot.com/2495041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@450 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 6c82cafe 2010-10-14T16:08:56 Replaced delete with delete[]. Patch submitted by timeless. BUG=59 Review URL: http://codereview.appspot.com/2493041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@449 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 9ecf3950 2010-10-13T19:28:25 GLSL backend now emits "#version 120" to legally access invariant keyword and gl_PointCoord built-in variable. BUG=35 Review URL: http://codereview.appspot.com/2341043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@448 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 5d752f29 2010-10-07T13:37:20 Add proper detection for maximum texture and renderbuffer size Trac #13849 Increased the maximum possible texture & renderbuffer size to 16384 (the minimum required for DX11 cards). Limit the actual maximum texture & renderbuffer size to the maximum that it reported by the underlying D3D9 device. Note that creating textures and renderbuffers at the maximum size will quickly exhaust video memory! Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@447 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 1c76801e 2010-10-07T00:35:24 - Check for D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES capability during initialization to fail on DirectX8 drivers. - Fail in GetDeviceCaps loop after one second. Review URL: http://codereview.appspot.com/2354042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@446 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org c1693978 2010-10-06T02:34:39 Made debug log filename compile time configurable. Define TRACE_OUTPUT_FILE macro to change filename. Default remains "debug.txt" for Visual Studio solution based build. Gyp based build uses "angle-debug.txt". Review URL: http://codereview.appspot.com/2327043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@445 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org b2bdd06c 2010-10-05T02:24:30 Fixed NULL dereference in glClear. 6 crashes on Windows XP 1 crash on Windows 7 This was Canary 7.0.530.0 using ANGLE r429. 0x011f523b [libGLESv2.dll - context.cpp:2412] gl::Context::clear(unsigned int) 0x011e5f41 [libGLESv2.dll - libglesv2.cpp:611] glClear 0x020c400d [chrome.dll - gl_context.cc:33] gfx::GLContext::InitializeCommon() 0x020bb757 [chrome.dll - gl_context_egl.cc:138] gfx::NativeViewEGLContext::Initialize() 0x020b8946 [chrome.dll - gl_context_win.cc:502] gfx::GLContext::CreateViewGLContext(HWND__ *,bool) 0x01c4f6f8 [chrome.dll - gpu_processor_win.cc:35] gpu::GPUProcessor::Initialize(HWND__ *,gfx::Size const &,gpu::GPUProcessor *,unsigned int) 0x01d6e669 [chrome.dll - gpu_command_buffer_stub.cc:88] GpuCommandBufferStub::OnInitialize(int,void * *) It's crashing upon creation of the GL context, possibly the first context. Device lost would possibly explain the XP crashes. The Windows 7 box might have run out of video memory. I also checked another couple of NULL dereference crashes. Review URL: http://codereview.appspot.com/2197046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@444 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 4888ceb6 2010-10-01T21:13:12 Made the API of shader translator library consistent. - We recently started using OpenGL-type enums. This CL makes all old enums consistent with the new scheme. - Renamed TBuiltInResource to ShBuiltInResources to have a consistent prefix BUG=46 Review URL: http://codereview.appspot.com/2328041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@443 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 10e6e9e3 2010-09-27T21:03:45 Handled case when variable declaration contains initialization. BUG=26 Review URL: http://codereview.appspot.com/2213049 git-svn-id: https://angleproject.googlecode.com/svn/trunk@441 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org ee76f6af 2010-09-27T19:28:55 Implemented functionality to collect and return info for attributes and uniforms. BUG=26 Review URL: http://codereview.appspot.com/2206046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@440 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 570bfc7c 2010-09-24T17:19:25 Built-in string for vertex shaders can be empty. Nicolas handled this case in r433 but r437 overwrote it. Review URL: http://codereview.appspot.com/2233046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@439 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com e979ead8 2010-09-23T18:03:14 Restore line endings Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@438 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 07620a58 2010-09-23T17:53:56 - Moved the implementation for ShCompile to the compiler class so that internal details about compiler can be encapsulated. Now we do not need to expose built-in symbol table. - Fixed a few const violations. - Added CollectAttribsUniforms class. BUG=26 Review URL: http://codereview.appspot.com/2263041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@437 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 36af61c5 2010-09-22T17:14:02 Reset a lost device before releasing it TRAC #13622 This prevents the driver from getting stuck in an undefined state and returning errors when trying to create a new device or querying capabilities. Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@436 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 677a1517 2010-09-22T17:13:59 Empty the surface and context sets on terminate TRAC #13623 This prevents a crash when the application calls eglTerminate multiple times without destroying the contexts or surfaces. Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@435 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com d3958d73 2010-09-22T17:13:54 Ensure that a surface is present before writing to it TRAC #13595 This fixes a bug where glTexSubImage is called on a mipmapped texture before calling glTexImage. Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/trunk@434 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com ecd7cf35 2010-09-22T17:13:50 Define vertex texture sampling intrinsics only when supported TRAC #12245 This ensures that the shader will fail to compile when using VTF when it's not supported. Previously an error was generated only at link time and it was not very descriptive. Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@433 736b8ea6-26fd-11df-bfd4-992fa37f6226
enne@chromium.org c5f8dea4 2010-09-21T16:40:30 Allow multisampling without enabling GL_SAMPLE_COVERAGE. This setting is only used when an application wants to control which samples are written to. If it is disabled, multisampling should just write to all samples. BUG=38 Review URL: http://codereview.appspot.com/2194043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@431 736b8ea6-26fd-11df-bfd4-992fa37f6226
enne@chromium.org 0fa74639 2010-09-21T16:18:52 Allow blitting to a render texture in BlitFramebuffer. Change the type check to allow blitting between render buffers and render textures. Store the format for render textures so that resolving to a render texture Colorbuffer will pass the format check. BUG=37 Review URL: http://codereview.appspot.com/2205043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@430 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 9398a6b2 2010-09-20T19:07:49 I hope this will fix a generateMipmaps crash when needRenderTarget fails. This fixes this crash in 7.0.524.0 on a user's Windows XP service pack 3 box. 0x014946f3 [libGLESv2.dll - texture.cpp:1382] gl::Texture2D::generateMipmaps() 0x0149786f [libGLESv2.dll - libglesv2.cpp:2114] glGenerateMipmap 0x01c53199 [chrome.dll - gles2_cmd_decoder.cc:2437] gpu::gles2::GLES2DecoderImpl::DoGenerateMipmap(unsigned int) 0x01c52216 [chrome.dll - gles2_cmd_decoder.cc:2214] gpu::gles2::GLES2DecoderImpl::DoCommand(unsigned int,unsigned int,void const *) 0x01c4fa78 [chrome.dll - cmd_parser.cc:56] gpu::CommandParser::ProcessCommand() 0x01c4f8ba [chrome.dll - gpu_processor.cc:100] gpu::GPUProcessor::ProcessCommands() 0x01ecdcce [chrome.dll - callback.h:119] CallbackImpl<BrowsingDataRemover,void ( BrowsingDataRemover::*)(void),Tuple0>::RunWithParams(Tuple0 const &) 0x01c4f2d9 [chrome.dll - callback.h:79] CallbackRunner<Tuple0>::Run() 0x01c4edce [chrome.dll - command_buffer_service.cc:80] gpu::CommandBufferService::Flush(int) 0x01d6b9b1 [chrome.dll - gpu_command_buffer_stub.cc:129] GpuCommandBufferStub::OnFlush(int,gpu::CommandBuffer::State *) This might be glGenerateMipmaps after a device lost. Review URL: http://codereview.appspot.com/2227044 git-svn-id: https://angleproject.googlecode.com/svn/trunk@429 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org e860f079 2010-09-20T19:06:56 Trying to fix bug crash when eglCreateWindowSurface (or any other code that causes createDevice to be invoked) is called and CreateDevice reports DEVICELOST or NOTAVAILABLE. This was a Windows XP service pack 3 box. 0x10002545 [libegl.dll - display.cpp:340] egl::Display::createDevice() 0x10002912 [libegl.dll - display.cpp:468] egl::Display::getDevice() 0x01d6a80f [chrome.dll - gpu_info_collector_win.cc:29] gpu_info_collector::CollectGraphicsInfo(GPUInfo *) 0x01d68eca [chrome.dll - gpu_thread.cc:104] GpuThread::OnEstablishChannel(int) Previously createDevice only checked for out of memory and the ASSERT(SUCCEEDED(result)) has no effect in release builds. I simulated the failure in a debugger and discovered a second place where a null dereference would occur in this case. I don't think this crash is technically correct but it prevents crashes. Review URL: http://codereview.appspot.com/2217043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@428 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 4d5962cd 2010-09-20T19:02:30 Texture2D::getRenderTarget does not assume that needsRenderTarget succeeded. Specifically, it checks that mTexture is not null. This is to fix this crash that has been happening out in the wild: 0x01444822 [libGLESv2.dll - texture.cpp:1417] gl::Texture2D::getRenderTarget(unsigned int) 0x01445615 [libGLESv2.dll - texture.cpp:2048] gl::Texture::TextureColorbufferProxy::getRenderTarget() 0x01453bb0 [libGLESv2.dll - context.cpp:1579] gl::Context::applyRenderTarget(bool) 0x01455395 [libGLESv2.dll - context.cpp:2413] gl::Context::clear(unsigned int) 0x014460c4 [libGLESv2.dll - libglesv2.cpp:611] glClear 0x01c53b75 [chrome.dll - gles2_cmd_decoder.cc:3021] gpu::gles2::GLES2DecoderImpl::ClearUnclearedRenderbuffers(unsigned int,gpu::gles2::FramebufferManager::FramebufferInfo *) 0x01c53cee [chrome.dll - gles2_cmd_decoder.cc:3078] gpu::gles2::GLES2DecoderImpl::DoFramebufferTexture2D(unsigned int,unsigned int,unsigned int,unsigned int,int) 0x01c57c7d [chrome.dll - gles2_cmd_decoder_autogen.h:756] gpu::gles2::GLES2DecoderImpl::HandleFramebufferTexture2D(unsigned int,gpu::gles2::FramebufferTexture2D const &) 0x01c52197 [chrome.dll - gles2_cmd_decoder.cc:2214] gpu::gles2::GLES2DecoderImpl::DoCommand(unsigned int,unsigned int,void const *) 0x01c4fa78 [chrome.dll - cmd_parser.cc:56] gpu::CommandParser::ProcessCommand() 0x01c4f8ba [chrome.dll - gpu_processor.cc:100] gpu::GPUProcessor::ProcessCommands() It was a Windows XP service pack 3 box with Chrome 7.0.524.0. ANGLE was at r418 in this build. I suspect it attempted to glClear after a device lost, which caused needsRenderTarget to fail. This will hopefully patch it up so it doesn't crash. We'll need to check we aren't assuming mTexture is not null elsewhere. Review URL: http://codereview.appspot.com/2233045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@427 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com d10f869d 2010-09-16T19:56:52 Fixed masked glClear TRAC #13577 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@426 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 7beea408 2010-09-15T21:18:34 Added API to query for active attribs and uniforms. These functions are modeled after glGetShaderiv, glGetProgramiv, glGetActiveAttrib, and glGetActiveUniform. The main difference between this and OpenGL API is that we do not have programs - just shaders. BUG=26 Review URL: http://codereview.appspot.com/2183041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@425 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 8d012dfc 2010-09-15T18:26:44 Added assertion to RefCountObject destructor that mRefCount is zero. Review URL: http://codereview.appspot.com/2180041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@424 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 4e3bad4e 2010-09-15T17:31:48 Changed raw pointers to RefCountObject to BindingPointers. I suspect there is a bug whereby an owning reference to a RefCountObject is temporarily assigned to a BindingPointer, causing it to be destroyed and making the owning raw pointer go dangling. Making this change for mColorbufferProxy seemed to fix a crash in Chrome with canvas 2D. This was previously landed in r417 and r418. Review URL: http://codereview.appspot.com/2108047 git-svn-id: https://angleproject.googlecode.com/svn/trunk@423 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org ff8bdfb0 2010-09-15T17:27:49 Backing out r417 and r418. I will recommit these as two separate patches: one for ID invalidation and one for reference counting issue. I will not recommit the FBO changes and since the GLES2 spec will soon make it undefined whether FBOs are in a shared namespace. Review URL: http://codereview.appspot.com/2154045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@422 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com a9cd70ac 2010-09-15T15:48:57 Fix glGetActiveUniform for samplers TRAC #13522 Original patch by Jim Hauxwell, fixed for full test suite conformance. Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@421 736b8ea6-26fd-11df-bfd4-992fa37f6226
vangelis@chromium.org cf66ebb8 2010-09-14T22:15:43 Renaming Context::mDepthStencilDirty flag to mDepthStencilInitialized to avoid breaking consistency http://codereview.appspot.com/2187041/ (Having trouble checking it in with gcl so going straight to subversion) git-svn-id: https://angleproject.googlecode.com/svn/trunk@420 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 85dc42bf 2010-09-14T03:10:08 Reset DepthStencilSurface after Context::markAllStateDirty() has been called. Landing on Vangelis' behalf. Original review: http://codereview.appspot.com/2184041/ git-svn-id: https://angleproject.googlecode.com/svn/trunk@419 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 9e287141 2010-09-11T03:46:57 Missing file. TBR=vangelis@chromium.org Review URL: http://codereview.appspot.com/2147046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@418 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 5525502d 2010-09-11T02:12:47 Replaced raw pointers to RefCountObject to BindingPointer. This fixes the ANGLE crashes in Chrome when using canvas 2D. The issue was this: Renderbuffer *mColorbufferProxy = new RenderBuffer(...); // Reference count is zero. BindingPointer<RenderBuffer> tempRef; tempRef.set(mColorbufferProxy); // Reference count is one. tempRef.set(NULL); // Reference count is zero and object is destroyed, leaving mColorbufferProxy dangling. I also initially suspected the problem was that FBOs are not treated as shared and the implementation of shared FBOs is still in the patch. I believe GLES2 supports shared FBOs. My reading of the GLES2 spec is that when a shared object is deleted, it loses its id but retains its state if left bound elsewhere. I added that to RefCountObject. Review URL: http://codereview.appspot.com/2120045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@417 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org d303ef9a 2010-09-09T17:30:15 ANGLE supports GL_OES_standard_derivatives now. BUG=25 Review URL: http://codereview.appspot.com/2122048 git-svn-id: https://angleproject.googlecode.com/svn/trunk@416 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 8815d7f2 2010-09-09T17:30:03 Added support for associating functions with extensions and performing validation when those functions are used in a shader. BUG=25 Review URL: http://codereview.appspot.com/2141046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@415 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org b19403a1 2010-09-08T17:56:26 Removed unnecessary member variables from TIntermAggregate. Replaced operator overloading with a proper function in TFunction. Review URL: http://codereview.appspot.com/2137043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@414 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org ad771eb2 2010-09-07T17:36:23 Added mechanism to predefine associated macros for extensions. Also refactored the way extension behavior is initialized and updated. Please note that I still need to add validation that appropriate extensions are enabled before using an extension function. BUG=25 Review URL: http://codereview.appspot.com/2139042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@413 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 8f0f24a0 2010-09-01T21:06:24 Removed support for unused/deprecated extension - GL_3DL_array_object. TEST=conformance tests. Review URL: http://codereview.appspot.com/2043043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@412 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 4b6b4f79 2010-09-01T18:13:40 Removes unused IsFloatingPoint function from utilities.cpp Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@411 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com fe208885 2010-09-01T15:47:57 Replaces Windows line endings with Unix where needed Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@410 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 1297d92b 2010-09-01T15:47:47 Implements support for renderable floating point textures. TRAC #12909 Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@409 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 0db0d6c8 2010-08-31T20:00:18 Replaces swap chain lazily when the swap interval is changed. It does not appear to be possible to pass a presentation interval to Present() or change it after creating the swap chain, short of calling Reset(). I decided to try fixing it by replacing the swap chain under the same conditions as a window resize. I tested it with a modified version of the simple vertex shader sample, passing various values to eglSwapInterval. My reading of the EGL spec might be wrong but I believe the interval state should be associated with the surface bound to the current context, rather than the display. Review URL: http://codereview.appspot.com/2036044 git-svn-id: https://angleproject.googlecode.com/svn/trunk@408 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 6a20d108 2010-08-31T13:54:27 Ensure mInfoLog is nulled out after it is deleted. Issue=27 Original-Author: Vladimir Vukicevic Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/trunk@407 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com d36c6a0a 2010-08-31T12:15:09 Implemented recovering from a lost device by context recreation. TRAC #13222 Singed-off-by: Daniel Koch Author: Nicolas Capens <nicolas@transgaming.com> git-svn-id: https://angleproject.googlecode.com/svn/trunk@406 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org d3bd0ad3 2010-08-30T18:55:36 Implemented GL_NV_fence extension. I believe I have implemented all features according to the spec. The application is to allow the Chrome command buffer scheduler to be smarter about deciding which command buffer to process. For example, if a WebGL app issued a call to ReadPixels, the scheduler will issue a fence and defer executing the ReadPixels until the status goes true. It can continue to work on other command buffers in the meantime. I tested by modifying the vertex shader demo. After issuing the SwapBuffers i made issue a fence and loop until the status went true and verified it looped several times. I also tested that by calling FinishFence before going into the loop that is did not loop at all. Review URL: http://codereview.appspot.com/1965043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@405 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 0a337e93 2010-08-28T17:38:27 Implement support for floating point textures. Trac #12909 Implements GL_OES_texture_float, GL_OES_texture_half_float, GL_OES_texture_float_linear, and GL_OES_texture_half_float_linear when supported by the hardware. Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Shannon Woods <shannon.woods@transgaming.com> git-svn-id: https://angleproject.googlecode.com/svn/trunk@404 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 06098890 2010-08-26T19:36:42 Allow derivative functions if derivative extension is enabled. I still need to add validation for "#extension GL_OES_standard_derivatives : enable". BUG=25 Review URL: http://codereview.appspot.com/1965045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@403 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 94a86ad8 2010-08-25T20:02:11 Adding support for OES_standard_derivatives extension. This is not the complete implementation. Sending it to get feedback on the API. Is it OK to add extension support into TBuiltInResource? I could create a new struct for extensions but that would lead to API change. BUG=25 Review URL: http://codereview.appspot.com/1953047 git-svn-id: https://angleproject.googlecode.com/svn/trunk@402 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 575e7910 2010-08-25T18:07:12 Changed glFlush to not wait until issued event is processed. I think these reduced synchronization guarantees are still compliant with the spec. I found that this significantly improved the frame rate for some of our demos (40 fps to 50fps for one on my box). I will change the demo so that it does not call glFlush at all but I still think this is a valuable change. The OpenGL ES2 spec says: "The command void Flush( void ); indicates that all commands that have previously been sent to the GL must complete in finite time." My reading of it is that any GL calls previously issued will be processed at some point in the future but not necessarily prior to glFlush returning. I believe that issuing the D3D event and then calling GetData once with the flush flag should meet these requirements. I also added some assertions to glFinish because I was paranoid that if issuing an event ever failed, the spin loop might never terminate. Review URL: http://codereview.appspot.com/1941049 git-svn-id: https://angleproject.googlecode.com/svn/trunk@401 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 58e54298 2010-08-24T21:40:03 Cleanup TType and related classes: 1. Removed unused functions 2. Removed unnecessary virtuality of functions 3. Grouped related functions together TEST=conformance tests Review URL: http://codereview.appspot.com/1984047 git-svn-id: https://angleproject.googlecode.com/svn/trunk@400 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 1ac37d80 2010-08-24T19:21:31 Optimizes Texture::loadImageData TRAC #13046 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@399 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 1dcea9f8 2010-08-24T19:21:27 Implements a special case for temporary surface creation for DXT low mip levels. TRAC #12908 The lowest mip levels for DXT textures will have dimensions < 4, so a D3D texture cannot be created to hold them offscreen directly. Instead, we must create a larger texture one of whose mip levels would be the desired dimension, and store the surface from that texture for later inclusion in the final texture. Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@398 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 01868135 2010-08-24T19:21:17 Implements compressed textures. TRAC #12714 Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@397 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com f5cde483 2010-08-24T19:21:11 Allocates a texture rather than an offscreen plain surface for new textures. TRAC #12908 Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@396 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com d36c2971 2010-08-24T19:21:07 Advertises the GL_OES_rgb8_rgba8 extension. Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@395 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 6397754a 2010-08-24T19:21:02 Implements support for rgb8 and rgba8 renderbuffer storage formats TRAC #12717 Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@394 736b8ea6-26fd-11df-bfd4-992fa37f6226