src/libGLESv2/ProgramBinary.cpp


Log

Author Commit Date CI Message
Jamie Madill cafa2102 2014-07-23T16:43:22 Fix Clang warnings. MSVC's more permissing validator missed a dependent typename, and deleting a void pointer. BUG=angle:703,704 Change-Id: I227b94c9c1590973d7b11b0ed0bfda32f2a71cec Reviewed-on: https://chromium-review.googlesource.com/209613 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e04a5b7b 2014-07-18T10:33:12 Remove sh::InterfaceBlock member info. We can compute the interface block member info entirely on the API side. This will allow us to get rid of some un-necessary code in the compiler. BUG=angle:466 Change-Id: I664ffc82de5f2723156e51f4e9ffc07e4de162aa Reviewed-on: https://chromium-review.googlesource.com/207781 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org>
Jamie Madill bf9cce2e 2014-07-18T10:33:09 Use the block encoder class to store uniform offsets. This will allow us to use the same code path for assigning register information in all places. Because of this it fixes some long-broken dEQP struct uniform tests. BUG=angle:466 BUG=angle:505 Change-Id: I4161a388503aa09bbe2d21ff47bfb3352ec93881 Reviewed-on: https://chromium-review.googlesource.com/207255 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org>
Jamie Madill 5b130dcc 2014-07-11T17:02:05 Do not create dummy variables when linking uniforms. This cleanup prepares us for removing the uniform register info from the shader translator types. BUG=angle:466 Change-Id: I86f47970b793135f410a5ef698fc96d44219ee96 Reviewed-on: https://chromium-review.googlesource.com/207253 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 66d43d24 2014-07-11T17:02:03 Refactor ProgramBinary uniform linking code. This prepares us for moving most of the register assignment to the ProgramBinary class itself, and cleans up the various methods. BUG=angle:466 Change-Id: Ie2965ed41ac50617584fd7a6d7b0ec2784e7dfaf Reviewed-on: https://chromium-review.googlesource.com/207252 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org>
Jamie Madill fc43d273 2014-07-11T17:02:02 Remove the sh::InterfaceBlock::dataSize member. We can replace this by doing the same calculation in the HLSL-side code. BUG=angle:466 Change-Id: Iecae4a92e9037e851419ce73e6267094ee8071a2 Reviewed-on: https://chromium-review.googlesource.com/207251 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill d4116ff3 2014-07-11T17:02:01 Remove sh::InterfaceBlock::registerIndex. This value is HLSL-only and we can use the new query API to hide it from GLSL programs. BUG=angle:466 Change-Id: I75dc2fbbf1b29b1f6d561568174a15dea1f5b130 Reviewed-on: https://chromium-review.googlesource.com/207250 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill d4cfa57d 2014-07-08T10:00:32 Move more draw call validation to the API. The GL expects us to reject invalid draw calls before we start doing any work, so we can prevent internal unnecessary state changes. Also update the program binary's cached sampler data when we validate. The previous patch was breaking draw calls in Google Earth WebGL. BUG=angle:571 BUG=390412 Change-Id: I1c4e204ae2467afc36b76af975a3a49e26349639 Reviewed-on: https://chromium-review.googlesource.com/206482 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e92a3546 2014-07-03T10:38:58 Remove redundant FBO query methods. Several query methods simply wrapped a NULL check with a default return value. Most of these safety checks were unnecessary. BUG=angle:660 Change-Id: I0ac6897f06be082c8efab8721920d1b51ba999ee Reviewed-on: https://chromium-review.googlesource.com/205606 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Ehsan Akhgari aa7e1660 2014-07-05T21:13:11 Improve the const correctness. This improvement to the const correctness makes ProgramBinary::save compile with clang-cl as well, which is more strict than MSVC. Change-Id: Iae091643fa1df7f094b89dbe7529c4e173f04a6d Reviewed-on: https://chromium-review.googlesource.com/206714 Tested-by: <ehsan@mozilla.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Brandon Jones d38f926a 2014-06-18T16:26:45 Refactoring Buffers BUG=angle:681 Change-Id: I6c3809e0b9468dfe38465c55759c2572c21485da Reviewed-on: https://chromium-review.googlesource.com/204896 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill f2575989 2014-06-25T16:04:54 Use the sh namespace for shader variables. Since these types originate from the translator, use an appropriate namespace. Also rename some of the gl helper functions to be more specific to their functionality. BUG=angle:466 Change-Id: Idc29987b2053b3c40748dd46b581f3dbd8a6fd61 Reviewed-on: https://chromium-review.googlesource.com/204680 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill e261b44a 2014-06-25T12:42:21 Remove obsolete Renderbuffer types. RenderbufferProxySet and FramebufferTextureBindingPointer aren't necessary any more with our refactored renderbuffer classes and ownership of attachments by the Framebuffer. We can also consolidate the FramebufferAttachment and implementation to a single class, and no longer need to store ref counted objects in the Framebuffer class directly. BUG=angle:660 Change-Id: Idcc06dfb42b47242b33494e797a0ba06d6669511 Reviewed-on: https://chromium-review.googlesource.com/201838 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Brandon Jones c7a41049 2014-06-23T12:03:25 Moved D3D specific files and folders under the D3D folder. Change-Id: I8afd67e08ee558fe94532c377d079673357a7192 Reviewed-on: https://chromium-review.googlesource.com/205229 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 04fb89ad 2014-06-09T15:05:36 Generate pixel shader output to match the bound framebuffer. Only generate pixel shader output variables for render targets that are currently bound. Fixes some performance issues with D3D10 cards that were slow to discard unused outputs. Fixed memory leaks in ProgramBinary by refactoring the freeing of the current state into a reset function. BUG=angle:670 Change-Id: I40f83e15724fb9a1a9ae61363a056999f1fa26d2 Reviewed-on: https://chromium-review.googlesource.com/202977 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 9c4b24a5 2014-06-12T13:41:17 Use commit_id.py on Windows, and handle missing git. This allows us to delete the Windows batch file. Changes the commit_id script to take the working directory so that it can be called from a different working directory than the angle repository is in. Renames the generated commit header to angle_commit.h. This is being written to the shared generated code directory for the entire build, and "commit.h" is insufficiently unique. BUG=angle:669 Change-Id: I35e80411a7e8ba1e02ce3f6a4fc54ed4dbc918f3 Reviewed-on: https://chromium-review.googlesource.com/202048 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Vladimir Vukicevic 24d8d675 2014-05-27T12:07:51 Fix register packing for structs in d3d9. Fixes WebGL test misc/shader-with-array-of-structs-uniform BUG=angle:656 Change-Id: If79a19db4d40bab9110422f7876de32e7f85e506 Reviewed-on: https://chromium-review.googlesource.com/200620 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Jamie Madill c600c8c3 2014-05-16T11:22:21 Fix arrays-of-struct and nested struct uniforms. Our computation of register offsets had a few errors that messed up nested structs and arrays of structs. This fixes a WebGL test, as well as several dEQP tests. BUG=angle:505 TEST=WebGL CTS 1.0.3, dEQP-GELS3.functional.uniform-api Change-Id: Id5a0f39481e079fe5ef5ef856943dc1f91ee3639 Reviewed-on: https://chromium-review.googlesource.com/200045 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3639892d 2014-05-20T14:51:53 Move all uniform validation from ProgramBinary to API layer. This will have the contract of having a successful API call once we call into the ANGLE internals, having successfully passed valiation. BUG=angle:571 Change-Id: Ia8d6eccc1e42bdf9e9cc5c10094a08729b42778a Reviewed-on: https://chromium-review.googlesource.com/200075 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1b2a8f96 2014-05-14T13:09:39 Fix binary serialization to use explicit size and type. Loading program binaries across different architectures would cause runtime errors due to use of size_t. Also fix the ANGLE major and minor version that were clobbered in an earlier commit. BUG=angle:647 BUG=371435 Change-Id: I9473cc7e119592fce336aa47881839543e337b69 Reviewed-on: https://chromium-review.googlesource.com/199633 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang ae1990c8 2014-05-12T16:57:14 Track if uniform data has been updated to avoid extra Map calls. Compare all uniform data to the values currently stored in the uniform and only mark the uniform as dirty if the data is new. This saves lots of buffer map calls when the same data is set on a uniform many times. BUG=260069 Change-Id: Ic4df8a276a81b074211712ff50e5cc4d0d9bb612 Reviewed-on: https://chromium-review.googlesource.com/199346 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ff0d2ba6 2014-05-14T13:49:10 Split register allocation of varyings from the translator. The translator gl::Varying struct does not need to know about register allocation. We can put that entirely in the API library. This makes exposing Varying variables with the new translator types cleaner. BUG=angle:466 Change-Id: Ib85ac27de003913a01f76d5f4dc52454530859e6 Reviewed-on: https://chromium-review.googlesource.com/199736 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4f8fcc24 2014-05-14T13:49:09 Remove gl::Varying::elementIndex. We only assigned to elementIndex, and never referenced the value at any point in our code. BUG=angle:466 Change-Id: I541a353110bcd1863b07b21bcf21fad38be19ca1 Reviewed-on: https://chromium-review.googlesource.com/199735 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 11c3b30f 2014-05-13T22:33:31 Revert "Fix binary serialization to use explicit size and type." This reverts commit 261988513e89479a0d121d045a8d89b64dc68214. Change-Id: I959ca14fcbb257f12005f7f0b64a600e906a118c Reviewed-on: https://chromium-review.googlesource.com/199630 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 26198851 2014-05-12T15:49:38 Fix binary serialization to use explicit size and type. Loading program binaries across different architectures would cause runtime errors due to use of size_t. Also fix the ANGLE major and minor version that were clobbered in an earlier commit. BUG=angle:647 BUG=371435 Change-Id: If2ad4c8fc246cc9ff0b4d95ba87b7d1ed109a064 Reviewed-on: https://chromium-review.googlesource.com/199102 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 07d68856 2014-05-06T16:31:14 Move the implementations of shader var init to the header. Making the contructors for shader variables inline saves us from exporting them across DLL boundaries. This makes it easier to use them in the translator when building the translator as a DLL. BUG=angle:466 Change-Id: Iee0556e06dc1f9e98fe9eea6577819305de0dd0b Reviewed-on: https://chromium-review.googlesource.com/198555 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7a29e4ae 2014-05-02T10:41:48 Stop generating duplicate vertex binaries. We would generate multiple vertex binaries that result in the same HLSL code, eg for vec2 and vec3 vertex attributes. Eliminate duplicates by using the converted attribute type for testing for matching binaries. BUG=angle:599 Change-Id: I061588164577ff9fa69ebb7d8a3f2bf6bb6fe013 Reviewed-on: https://chromium-review.googlesource.com/197830 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang cc14f104 2014-05-05T17:00:40 Use a static function instead of a static initializer for defaultBlockInfo. BUG=angle:640 Change-Id: I5fe568c9a2b492a5bd8a42142762229c5f992c7e Reviewed-on: https://chromium-review.googlesource.com/198248 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 834e8b77 2014-04-11T13:33:58 Move ShaderVariables to common shared source. Also move the block layout encoding utilities to the common folder. The combined changes allow us to include the shader and block code into both libGLESv2 and the translator separately. This in turn fixes the Chromium component build, where we were calling internal translator functions directly from libGLESv2. BUG=angle:568 Change-Id: Ibcfa2c936a7c737ad515c10bd24061ff39ee5747 Reviewed-on: https://chromium-review.googlesource.com/192891 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill ac0a267b 2014-04-11T13:33:56 Fix non-square matrix vertex attributes. When we generate an input signature for a vertex shader, we should use the transpose of the matrix type instead of the matrix type itself. This was breaking dEQP tests 'shaders.functions.datatypes'. BUG=angle:594 Change-Id: Ia945ffd865d7255500f7a62394bcd5bdfbbedef4 Reviewed-on: https://chromium-review.googlesource.com/191461 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang cebb5aa0 2014-04-07T14:13:40 Fix warnings about unreferenced local variables. BUG=angleproject:602 Change-Id: I2eb04fe6eed60b3877b14628e81c0b1fe3b68647 Reviewed-on: https://chromium-review.googlesource.com/193431 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill 8b4f8f84 2014-03-26T14:01:58 Fix D3D11 resource leaks. A few bugs, like missing destructors or Release calls were leaking D3D resources in a few places on exit. This patch should fix all the unreleased D3D object warnings on exit when running a sample app. BUG=angle:589 Change-Id: Ib50df3229998938cddc2859d6f2d19ddd3a4db47 Reviewed-on: https://chromium-review.googlesource.com/190079 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 48dcae7b 2014-02-05T16:28:24 Added transform feedback shader generation. BUG=angle:495 Change-Id: I41a0177fd3eb43c9f4ab9e54faeadac3eb483c2c Reviewed-on: https://chromium-review.googlesource.com/185035 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 3b7e205c 2014-03-17T09:47:43 Fix matrix input attributes and formats. We can't assume we have a simple mapping between input attribs and shader attribs. The app specifies matrix input attribs as several vector inputs, while the shader uses a single matrix type. BUG=angle:576 Change-Id: I4e3cdde4a14a5f06b86052dfe0325113cbe8e599 Reviewed-on: https://chromium-review.googlesource.com/189193 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Nicolas Capens 0027fa9f 2014-02-20T14:26:42 Emulate integer cube texture sampling as an array of six 2D textures. BUG=angle:525 Change-Id: I3c3ec2cecebf9e745f0c02a132433e3076a6fdea Reviewed-on: https://chromium-review.googlesource.com/187534 Tested-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c5ede1a7 2014-02-14T16:41:27 Add logic for inserting vertex conversion code in HLSL. The patch refactors the vertex input HLSL to allow for dynamic conversion in the future. Using a placehold keyword, the code replaces that stub with the vertex input conversion logic. BUG=angle:560 Change-Id: I100c50cb4decd45b0f0c10d7c2c22583368b773e Reviewed-on: https://chromium-review.googlesource.com/185194 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2c7d84ac 2014-02-14T16:41:26 Store un-linked shader attributes in ProgramBinary. Our caching of compiled vertex shaders according to their input signature needs a consistent input signature to match up shaders. Since the linking step currently shuffles attributes according to API specified locations we need a separate list. BUG=angle:560 Change-Id: Icc4d5df1d37ae895d5c882b86e60f05b5c268461 Reviewed-on: https://chromium-review.googlesource.com/185193 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c5a83000 2014-02-14T16:41:25 Store multiple vertex executables in the program binary. With dynamic vertex conversion the GPU, we will have different input layouts resulting in different executables. This patch adds a way of mapping the input layouts to vertex executables. BUG=angle:560 Change-Id: Ie36f2f8ac2dfcb96f562af577d31f57d6d89b447 Reviewed-on: https://chromium-review.googlesource.com/185192 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5f562735 2014-02-14T16:41:24 Moved all HLSL-related code from ProgramBinary to DynamicHLSL. DynamicHLSL encapsulates all HLSL generation we need outside the the shader translator, such as for linking between input and output stages and point sprite geometry shaders. BUG=angle:560 Change-Id: Ib5079aa102000a7c37b166bcbe26b09cc82f8932 Reviewed-on: https://chromium-review.googlesource.com/185191 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0aa84f63 2014-02-13T13:17:23 Merge 'Tie program binary version to commit hash.' Port changes from master branch with commit hash embedding to the development branch. BUG=angle:529 Change-Id: I307bf44103913aaaeb875a2e3ade1fab77838c48 Reviewed-on: https://chromium-review.googlesource.com/186390 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8ff21aea 2014-02-04T16:04:05 Move storage for uniform blocks to the program binary. With dynamic shaders we may have multiple shader executables per program binary. We must store the uniforms outside the executable, in the program binary, to be consistent between variations. Change-Id: I1b29a5d78c72dede8562d4878569b609536ba074 Reviewed-on: https://chromium-review.googlesource.com/183586 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 03181abc 2013-12-18T12:56:06 Fix sorting uninitialized attribute semantics to the end. A missing condition would produce a sort order where sometimes -1 was shifted to the front of the semantic array, instead of the end. BUG=angle:527 Change-Id: I69b2e5ccc03f6523771601cd59293d6cd325be2f Reviewed-on: https://chromium-review.googlesource.com/180651 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 049108df 2013-11-19T10:41:49 Include the current commit as part of the build process. BUG=angle:529 Change-Id: I6d1d227b495e9bae6e017c88642679210c6d2355 Reviewed-on: https://chromium-review.googlesource.com/177233 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Commit-Queue: Shannon Woods <shannonwoods@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill 3c9eeb97 2013-11-04T11:09:26 Disable optimizations for shaders with conditional discard in D3D9, and only use expanded short-circuiting conditionals for expressions with potential side-effects. Conservatively assume aggreate and selection operators have side effects for now. BUG= ANGLEBUG=486 R=geofflang@chromium.org, kbr@chromium.org, nicolas@transgaming.com, shannonwoods@chromium.org Review URL: https://codereview.appspot.com/14441075 Conflicts: src/common/version.h src/compiler/translator.vcxproj src/compiler/translator.vcxproj.filters src/compiler/translator/OutputHLSL.cpp src/libGLESv2/ProgramBinary.cpp src/libGLESv2/Shader.cpp src/libGLESv2/Shader.h Change-Id: Iaf9f10b5de7b33c927ef032f3c4fe9d5095f64dd
Jamie Madill fcef3366 2013-11-13T19:37:19 Fix bug with nested struct uniforms. TRAC #22875 Change-Id: I204cea18a710f6b9206a578a69f1dbc1e13fbd71 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang
Jamie Madill f07558ac 2013-10-31T11:16:22 Fix glGetUniform for non-square matrices. TRAC #22846 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang
Geoff Lang 17732823 2013-08-29T13:46:49 Moved the compiler source files into directories based on their project and added a compiler.gypi to generate the compiler projects.
Al Patrick 3f2daa89 2013-08-07T12:58:57 Presort reverse mapping of ProgramBinary::mSemanticIndex.
Jamie Madill 5609378d 2013-08-30T13:21:11 Add full support for uniform structs. TRAC #23750 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens
Jamie Madill 5b085dc3 2013-08-30T13:21:11 Add a field to uniforms to track which element within a register the uniform should be uploaded to. This is necessary to support HLSL-backed uniform structs. TRAC #23750 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens
Jamie Madill 28167c62 2013-08-30T13:21:10 Add support for struct varyings, and more robust varying link validation. TRAC #23749 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens
Jamie Madill c2141fb3 2013-08-30T13:21:08 Consolidate the register counting functions to a single location in the HLSL layout encoder source. This new method explicitly depends on HLSL packing rules, instead of a GL idiom. TRAC #23748 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens
Jamie Madill a6da33a1 2013-08-30T13:21:07 Remove the gl::Varying class, and replace all usages with sh::Varying. TRAC #23746 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods
Jamie Madill 139b9091 2013-08-30T13:21:06 Simplify the gl::Varying struct to be more like sh::Varying. The subsequent patches will remove gl::Varying entirely. TRAC #23746 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods
Jamie Madill ce79dda1 2013-08-30T13:21:06 Change the varyings list type from a linked list to a vector type. TRAC #23746 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods
Jamie Madill 9d2ffb1d 2013-08-30T13:21:04 Refactor sh::Uniform and sh::ShaderVariable into a shader variable base type with different child types. This change gives us better memory usage (many fields are unnecessary in different types) with better static typing and clear type abstraction for specific methods that might take Attributes or Varyings, etc. TRAC #23754 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods
Jamie Madill 9060a4e0 2013-08-12T16:22:57 Fix some missing UBO qualifier link validation errors. TRAC #23747 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods
Nicolas Capens cb127d3d 2013-07-15T17:26:18 Create the HLSL shadow texture function. TRAC #23394 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Nicolas Capens
Nicolas Capens 43e8ba8a 2013-07-09T10:35:15 Support 3D textures. TRAC #23472 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Nicolas Capens
Nicolas Capens e6050884 2013-07-08T10:43:10 Handle new sampler types. TRAC #23472 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Nicolas Capens
Jamie Madill 2aeb26a4 2013-07-08T14:02:55 Added support for EXT_frag_depth This change also required that support be added for associating built-in variables with an extension, similar to how functions could be associated with extensions previously. R=alokp@chromium.org Review URL: https://codereview.appspot.com/9827044 git-svn-id: https://angleproject.googlecode.com/svn/trunk@2248 736b8ea6-26fd-11df-bfd4-992fa37f6226 TRAC #23333 Authored-by: bajones@chromium.org Signed-off-by: Shannon Woods Signed-off-by Nicolas Capens Merged-by: Jamie Madill
Jamie Madill 87939710 2013-07-02T11:57:01 Move VertexAttribute to its own header file. This is in preparation for VAO support. TRAC #23390 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang Authored-by: Jamie Madill
Jamie Madill 6fb09f6c 2013-06-21T09:15:31 Fix a typo when reporting too many interface blocks in a fragment program. TRAC #23326 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Authored-by: Jamie Madill
Jamie Madill d1ac3c90 2013-06-25T10:40:30 Move the D3DCompile call to after the check for API link errors. This avoids producing unhelpful internal D3D errors. TRAC #23326 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Authored-by: Jamie Madill
Jamie Madill b4e664b1 2013-06-20T11:55:54 Alter array instanced uniform buffer objects to use direct references to HLSL constant buffers. This avoids using a shader scoped static storage buffer, with copies. TRAC #23299 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Authored-by: Jamie Madill
Jamie Madill 010fffa8 2013-06-20T11:55:53 Pass matrix packing qualifier data back from the shader translator to the GLES API. TRAC #23271 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Authored-by: Jamie Madill
Jamie Madill eba4eff5 2013-06-20T11:55:51 Add support for specifying locations of vertex inputs using layout qualifiers, for GLSL ES 3.00. TRAC #23269 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Authored-by: Jamie Madill
Jamie Madill defb674a 2013-06-20T11:55:51 Add a new path for querying active attributes from the shader translator, for use with layout qualifier support. TRAC #23269 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill
Jamie Madill bb22e508 2013-06-20T11:55:51 Fix an improper use of VariableRowCount to AttributeRegisterCount in ProgramBinary. This is a regression from the non-square matrix uniforms implementation. TRAC #23269 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Authored-by: Jamie Madill
Jamie Madill d1e78c9c 2013-06-20T11:55:50 Implement GetFragDataLocation, often used by applications with MRT shaders in GLSL ES version 300. TRAC #22704 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Authored-by: Jamie Madill
Jamie Madill 46131a38 2013-06-20T11:55:50 Proper support for fragment output variables for GLSL ES shader version 300. TRAC #22704 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Authored-by: Jamie Madill
Jamie Madill acdd70f4 2013-06-07T14:39:56 Fix nested uniforms in interface blocks to have the proper API-visible names. TRAC #22856 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Authored-by: Jamie Madill
Jamie Madill 63491eae 2013-06-06T11:56:45 Rename UniformLocation to VariableLocation, and add an arrayString helper method to ProgramBinary. TRAC #23268 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Authored-by: Jamie Madill
shannonwoods@chromium.org 8c788e8d 2013-05-30T00:20:21 Add support for unsigned integer vector types to the shader translator. TRAC #23080 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2404 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 6b709911 2013-05-30T00:20:04 Add support for the unsigned integer scalar type to the shader translator. TRAC #23080 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2403 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 5703d881 2013-05-30T00:19:38 Add full integer support to the shader language. TRAC #23080 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2400 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org b4e07b89 2013-05-30T00:19:31 Put GL to HLSL type string code to a separate helper function in ProgramBinary. TRAC #23080 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2399 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 9bd22fa9 2013-05-30T00:18:47 Add support for non-square matrices to the shader translator. TRAC #23081 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2394 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 5f8d9b46 2013-05-30T00:17:57 Add support for arrays of aggregates (aka structs) in uniform blocks. TRAC #23018 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2388 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 70961b33 2013-05-30T00:17:48 Add support for structures in interface and uniform blocks. Also redesigns the uniform block layout computation to be more general. TRAC #23018 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2387 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org b1dc1b6a 2013-05-30T00:15:43 Report correct name length for array variables in GetActiveUniformiv. TRAC #23018 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2370 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 932cc6b0 2013-05-30T00:15:37 Report correct name length for active uniform block arrays. TRAC #23186 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2369 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 83ac5e82 2013-05-30T00:15:29 Add the shader version of the compiled shaders to the program binary. Also increment the binary version. TRAC #23182 Signed-off-by: Shannon Woods Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2368 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 2c2b82bd 2013-05-30T00:15:12 Fix using incorrect width and height in transposeMatrix. This caused issues with non-square matrix uniforms. TRAC #22840 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2366 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org e429ab71 2013-05-30T00:12:52 Add support to the HLSL translator for arrays of named interface blocks. TRAC #22930 Signed-off-by: Nicolas Capens Signed-off-by: Geoff Lang Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2347 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org a2ecfccc 2013-05-30T00:11:59 Moved utilities.h/cpp and mathutils.h to the shared common code folder. The HLSL translator needs to compute the sizes of various GL types for computing block layouts. TRAC #22930 Signed-off-by: Nicolas Capens Signed-off-by: Geoff Lang Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2342 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 1bddfb98 2013-05-30T00:11:29 Pass uniform buffers active bound to uniform blocks of the active program to HLSL/D3D constant buffers. TRAC #22892 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2339 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 1500f093 2013-05-30T00:11:20 Add uniform block linking between the API, the program binary, and the compiler. TRAC #22892 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2338 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 7923dd2b 2013-05-30T00:11:04 Properly validate struct uniform linking between the vertex and pixel shaders. This also implements proper struct validation for uniform blocks. TRAC #22932 Signed-off-by: Nicolas Capens Signed-off-by: Geoff Lang Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2336 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org f97a084f 2013-05-30T00:10:33 Store optimization level in program binaries and do not load those compiled with a different level. Review URL: https://codereview.appspot.com/9427043 Conflicts: src/libGLESv2/renderer/Renderer9.cpp git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2332 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org e684b58a 2013-05-30T00:07:42 Add support for querying number of active uniform blocks/block name max length from a program object. TRAC #22858 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2311 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org e7317ca8 2013-05-30T00:07:35 Implement glGetActiveUniformBlockiv. TRAC #22858 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2310 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org beb02783 2013-05-30T00:07:28 Implement glGetActiveUniformBlockName. TRAC #22858 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2309 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 70eb1ea2 2013-05-30T00:07:20 Implement UniformBlockBinding, and necessary state to track uniform block bindings on the API side. TRAC #22858 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2308 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 42766252 2013-05-30T00:07:12 Implement the API-side logic GetUniformBlockIndex. Functionality depends on shader support. TRAC #22858 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2307 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org d7784174 2013-05-30T00:07:03 Add state for uniform blocks to ProgramBinary, along with loading and saving of the new binary format. Updated Version.h with this patch. TRAC #22858 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill Conflicts: src/common/version.h git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2306 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 38676dc1 2013-05-30T00:06:52 Refactor Uniform::[vp]sRegisterIndex to unsigned integers. TRAC #22858 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2305 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 6d7b61c2 2013-05-30T00:06:38 Add a helper routine to parse out uniform array indices. TRAC #22858 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2303 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 0ee85f88 2013-05-30T00:05:47 Not not allow the app to query uniform locations of basic types with "[0]" appended to the uniform name. TRAC #22865 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2295 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 2a9a9d23 2013-05-30T00:05:40 Implement glGetActiveUniformsiv, querying specific uniform properties. TRAC #22865 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2294 736b8ea6-26fd-11df-bfd4-992fa37f6226