OSDN Git Service
Nicolas Capens [Tue, 8 Nov 2016 19:28:59 +0000 (14:28 -0500)]
Implement remaining vector compare operations.
Bug swiftshader:15
Change-Id: I69184dcb70f4a4082a25420a0dade7bc87a8027e
Reviewed-on: https://swiftshader-review.googlesource.com/7957
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8162
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Tue, 8 Nov 2016 16:37:01 +0000 (11:37 -0500)]
Implement negation and inversion.
Bug swiftshader:6
Change-Id: I1eaef2745f6e1aa3defb39f408df36e654f97b4d
Reviewed-on: https://swiftshader-review.googlesource.com/7956
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8161
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Tue, 8 Nov 2016 03:25:14 +0000 (22:25 -0500)]
Implement vector intrinsics.
Bug swiftshader:15
Change-Id: I1391f656bce9b5cb09c4034df977ae4757e58843
Reviewed-on: https://swiftshader-review.googlesource.com/7955
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8160
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Mon, 7 Nov 2016 22:32:17 +0000 (17:32 -0500)]
Implement floating-point rounding intrinsics.
Bug swiftshader:15
Change-Id: I27fe7bd2f0deaf19fab2f4565574ad084c49cddb
Reviewed-on: https://swiftshader-review.googlesource.com/7954
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8159
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Mon, 7 Nov 2016 21:05:22 +0000 (16:05 -0500)]
Implement increment/decrement operators.
Bug swiftshader:6
Change-Id: Ie59ca6e16eb82b84b01d9f47e5168fce7614084e
Reviewed-on: https://swiftshader-review.googlesource.com/7953
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8158
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Mon, 7 Nov 2016 20:32:52 +0000 (15:32 -0500)]
Remove unused createIntCast() method.
Bug swiftshader:6
Change-Id: Iba0a4904e99f7323c7e2044be03bb7dd950929d9
Reviewed-on: https://swiftshader-review.googlesource.com/7951
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8157
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Mon, 7 Nov 2016 20:30:33 +0000 (15:30 -0500)]
Don't use Long1 for stencil operations.
Bug swiftshader:15
Change-Id: I4fa5356109e35ac13f9f8d5a97e9059262901051
Reviewed-on: https://swiftshader-review.googlesource.com/7950
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8156
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Mon, 7 Nov 2016 18:01:07 +0000 (13:01 -0500)]
Fix debug dump and error output.
Bug swiftshader:6
Change-Id: I170feba4050b750727fa57927545996577123e30
Reviewed-on: https://swiftshader-review.googlesource.com/7930
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8155
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Tue, 1 Nov 2016 03:23:15 +0000 (23:23 -0400)]
Implement square root and reciprocal.
Bug swiftshader:15
Change-Id: If9336a87f90269a295fcd3b3bff2fd6899c773e4
Reviewed-on: https://swiftshader-review.googlesource.com/7910
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8154
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Thu, 27 Oct 2016 14:20:28 +0000 (10:20 -0400)]
Simplify abstract value bitcasting.
Change-Id: I173d563cd3cd17cf90caf723f29a6c1da51103b5
Reviewed-on: https://swiftshader-review.googlesource.com/7872
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8153
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Thu, 27 Oct 2016 03:38:41 +0000 (23:38 -0400)]
Fix packing of 64-bit vectors.
Bug swiftshader:15
Change-Id: I5177113ad50ff2e1aa99f772d9254f7894ce5a61
Reviewed-on: https://swiftshader-review.googlesource.com/7870
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8152
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Wed, 26 Oct 2016 04:23:12 +0000 (00:23 -0400)]
Implement min/max.
Bug swiftshader:15
Change-Id: I785e31724e802a3ed1bca75186e012ccc7cb336e
Reviewed-on: https://swiftshader-review.googlesource.com/7850
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8151
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Tue, 25 Oct 2016 21:32:37 +0000 (17:32 -0400)]
Implement vector packing.
Bug swiftshader:15
Change-Id: I3b20ba10e71c7813c35b16ae6c7382bfe4e0ae00
Reviewed-on: https://swiftshader-review.googlesource.com/7851
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8150
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Tue, 25 Oct 2016 21:32:37 +0000 (17:32 -0400)]
Implement unpacking of high 64-bit vector halves.
Bug swiftshader:15
Change-Id: I59bfec356b04ebc2ff7d8507d39ec8f18c57e42a
Reviewed-on: https://swiftshader-review.googlesource.com/7830
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8149
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Fri, 21 Oct 2016 21:26:13 +0000 (17:26 -0400)]
Implement vector sign mask operations.
Bug swiftshader:15
Change-Id: I0d9cb2daeea931994abeb63f0939879875d4e81f
Reviewed-on: https://swiftshader-review.googlesource.com/7791
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8148
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Fri, 21 Oct 2016 19:30:29 +0000 (15:30 -0400)]
Implement arithmetic and logical operations.
Bug swiftshader:15
Change-Id: I27f7c2b9d87841a1eae0d9bc92fbe79b28c65982
Reviewed-on: https://swiftshader-review.googlesource.com/7773
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8146
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Fri, 21 Oct 2016 20:23:24 +0000 (16:23 -0400)]
Enable multiprocessor compilation.
Change-Id: Ie932ff6fa92bd026754a4339919df02093bdae95
Reviewed-on: https://swiftshader-review.googlesource.com/7775
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8147
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Fri, 21 Oct 2016 18:26:34 +0000 (14:26 -0400)]
Implement vector shift by constant.
Bug swiftshader:15
Change-Id: Ief486cf0fe140a5b345f9a40c19c6e293d5798a4
Reviewed-on: https://swiftshader-review.googlesource.com/7772
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8145
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Mon, 24 Oct 2016 21:49:13 +0000 (17:49 -0400)]
Limit loop init scope to till end of loop.
Bug swiftshader:13
Change-Id: I03cdbb3e5ea28643eb941e162125da68d183d1c6
Reviewed-on: https://swiftshader-review.googlesource.com/7810
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8144
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Mon, 24 Oct 2016 13:52:23 +0000 (09:52 -0400)]
Implement Else without using basic block predecessor.
Bug swiftshader:13
Change-Id: Idd49e64aa8415ceb5d1cfee7b65a7d67ea0ebd40
Reviewed-on: https://swiftshader-review.googlesource.com/7792
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8143
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Mon, 24 Oct 2016 15:32:53 +0000 (11:32 -0400)]
Add additional Subzero assembler unit tests.
Change-Id: I6ad39c934a605e190171c8fb427c75ad587f4a68
Reviewed-on: https://swiftshader-review.googlesource.com/7793
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8142
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Fri, 21 Oct 2016 19:08:56 +0000 (15:08 -0400)]
Implement several vector shuffle operations.
Bug swiftshader:15
Change-Id: I3f670be22415433a0582b3335fb48040e5a171c3
Reviewed-on: https://swiftshader-review.googlesource.com/7790
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8141
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Thu, 20 Oct 2016 18:57:26 +0000 (14:57 -0400)]
Remove build dependencies on (LLVM)Reactor.
Change-Id: I8c22ec3291f93e2a5baac4067baea73415dfa218
Reviewed-on: https://swiftshader-review.googlesource.com/7758
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8140
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Fri, 21 Oct 2016 17:19:34 +0000 (13:19 -0400)]
Add Float4 swizzle tests.
Bug swiftshader:15
Change-Id: Id270f2f965a5a7154fa4dc83bd1edcd72cf2ff15
Reviewed-on: https://swiftshader-review.googlesource.com/7770
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8139
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Thu, 20 Oct 2016 17:20:34 +0000 (13:20 -0400)]
Implement remaining constant creations.
Bug swiftshader:6
Change-Id: I3ab9023e2ac91a8435b403ebdd16e741197ecf6b
Reviewed-on: https://swiftshader-review.googlesource.com/7757
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8138
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Thu, 20 Oct 2016 15:31:36 +0000 (11:31 -0400)]
Implement Return() variants.
Bug swiftshader:6
Change-Id: I4a52eda6583a8731fd8e7a8bc15e716a772b8842
Reviewed-on: https://swiftshader-review.googlesource.com/7756
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8137
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Thu, 20 Oct 2016 15:25:55 +0000 (11:25 -0400)]
Implement support for arrays.
Bug swiftshader:6
Change-Id: I9ffcca588014466acb7f13a3df551a696ada8a91
Reviewed-on: https://swiftshader-review.googlesource.com/7755
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8136
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Thu, 20 Oct 2016 05:29:33 +0000 (01:29 -0400)]
Fix floating-point constant vector initialization.
Bug swiftshader:17
Change-Id: Idc1ea72f71770eb1378afb850d16026430adef60
Reviewed-on: https://swiftshader-review.googlesource.com/7754
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8135
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Thu, 20 Oct 2016 05:00:19 +0000 (01:00 -0400)]
Implement additional types.
Bug swiftshader:6
Change-Id: I6443479e34b0819de45196c61a2e9fc0bf0e84d7
Reviewed-on: https://swiftshader-review.googlesource.com/7752
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8134
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Thu, 20 Oct 2016 05:11:47 +0000 (01:11 -0400)]
Remove the Long2 type.
Bug swiftshader:6
Change-Id: Idb083bd1aecedb529f4e15deda3a1cfcf95a5bfa
Reviewed-on: https://swiftshader-review.googlesource.com/7753
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8133
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Thu, 20 Oct 2016 04:01:38 +0000 (00:01 -0400)]
Implement comparison operations.
Bug swiftshader:6
Change-Id: I7910f6e9711f91cdee9425c2768dffb76b3ffe61
Reviewed-on: https://swiftshader-review.googlesource.com/7751
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8132
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Thu, 20 Oct 2016 03:45:19 +0000 (23:45 -0400)]
Fix relocating the code just once.
Bug swiftshader:9
Change-Id: I5968426e6ffd53f65f0699017d35d07ff45bffab
Reviewed-on: https://swiftshader-review.googlesource.com/7750
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8131
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Wed, 19 Oct 2016 14:29:49 +0000 (10:29 -0400)]
Assert on Subzero translation errors.
Bug swiftshader:6
Change-Id: I7d32d12081f4a704f4731cfa29c0eadf75a43d49
Reviewed-on: https://swiftshader-review.googlesource.com/7738
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8130
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Thu, 13 Oct 2016 21:44:51 +0000 (17:44 -0400)]
Implement support for vector constants.
Bug swiftshader:17
Change-Id: Ifde00443ab55a4cf68a038fac6356182518253fe
Reviewed-on: https://swiftshader-review.googlesource.com/7715
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/7671
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Thu, 13 Oct 2016 19:36:36 +0000 (15:36 -0400)]
Implement support for ELF relocations.
Bug swiftshader:17
Change-Id: I3ba076bdfd733797f627c50c37dea83326ddee35
Reviewed-on: https://swiftshader-review.googlesource.com/7714
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/7670
Nicolas Capens [Thu, 13 Oct 2016 18:52:12 +0000 (14:52 -0400)]
Refactor constant creation.
Distinguishing between Values and Constants complicates the creation
of constant vectors, and isn't necessary when using Subzero assign
operations to convert between them internally. Also, construct vector
constants from arrays of basic types.
Bug swiftshader:17
Change-Id: I9c03655ed18d5b4bd3797a252cd7f02793205254
Reviewed-on: https://swiftshader-review.googlesource.com/7713
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/7650
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Fri, 30 Sep 2016 18:57:16 +0000 (14:57 -0400)]
Emulate vectors shorter than 128-bit.
Bug swiftshader:15
Change-Id: I065c52711719b12fe55cf0190e735240c008629e
Reviewed-on: https://swiftshader-review.googlesource.com/7712
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/7390
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Thu, 13 Oct 2016 17:39:01 +0000 (13:39 -0400)]
Avoid ambiguous vector casts.
Bug swiftshader:15
Change-Id: Ia42d21b4f2c9e19a839ffb414661f2dffa350692
Reviewed-on: https://swiftshader-review.googlesource.com/7711
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/7630
Reviewed-by: Alexis Hétu <sugoi@google.com>
Alexis Hetu [Wed, 30 Nov 2016 19:34:07 +0000 (14:34 -0500)]
More blitFramebuffer fixes
A few minor adjustments:
- The validity of blit operations with the same bounds on source
and destination buffer also extends to color buffers
- Renderbuffers, whether GL_RENDERBUFFER or GL_FRAMEBUFFER_DEFAULT
are considered of the same type for the purpose of blitting
Change-Id: I0de7c19aa8b07fa57ed33b98be4a4ab609e6e115
Reviewed-on: https://swiftshader-review.googlesource.com/8213
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Wed, 30 Nov 2016 16:25:28 +0000 (11:25 -0500)]
Fixed blitFramebuffer issue with Depth/Stencil
A condition was overly aggressive in producing an INVALID_OPERATION
when the read depth/stencil framebuffer is multisampled. When the
formats are the same and source and destination rectangles are the
same, performing a blitFramebuffer operation is allowed.
Change-Id: I29e52cb546ae1bf248ac0107492c97ea82406613
Reviewed-on: https://swiftshader-review.googlesource.com/8212
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Tue, 22 Nov 2016 19:13:01 +0000 (14:13 -0500)]
Fixed some quad layout computation related warnings
Linux was complaining about ambiguous conditional expressions.
Added some explicit casts to RValue<Int> to fix these warnings.
Change-Id: Ib8e01ee69bb1794ea60b7954f1520a15e383cefa
Reviewed-on: https://swiftshader-review.googlesource.com/8111
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Tue, 22 Nov 2016 18:47:04 +0000 (13:47 -0500)]
Fixed official chromium build on Linux
A warning treated as an error was causing the
official build to fail. Added -Wno-unused-result
to the LLVM build file to solve the issue.
Also ran 'git cl format' on the BUILD.gn files
to fix all formatting issues.
Change-Id: I235c7d9d3e60f788e1dc694a40991c214e6c77e3
Reviewed-on: https://swiftshader-review.googlesource.com/8110
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
Alexis Hetu [Thu, 6 Oct 2016 15:25:32 +0000 (11:25 -0400)]
glBlitFramebuffer support for depth/stencil formats
Added support for depth and stencil formats for glBlitFramebuffer:
- Blitter now supports quad layout and stencil
- Device::stretchRect() now supports specific buffers, so that a
caller can specifically choose which buffer to copy
Change-Id: Iae0898df11e0a1d3c006113486ed15a3fd2f90a9
Reviewed-on: https://swiftshader-review.googlesource.com/7510
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Wed, 16 Nov 2016 18:53:57 +0000 (13:53 -0500)]
Added compilation test for SwiftShader
This is a new compilation only test which can be used
to trigger swiftshader compilation on test bots. More
unit tests can be added later.
Change-Id: I46e605b3e7a67438f8f36346e4fcd4e06a2b00ec
Reviewed-on: https://swiftshader-review.googlesource.com/8032
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Mon, 14 Nov 2016 19:10:47 +0000 (14:10 -0500)]
Fixed clang warnings and unmuted these warnings
A few warnings were fixed:
- 2 sets of virtual flip/blit functions were colliding, so
I added pure virtual function overrides so that both
definitions appear within FrameBufferWin
- Moved a few variables within ASSERT inside the ASSERT
statement in order to remove unused variable warnings
- Removed stack option from glslang.l and removed comments
handling code, which is actually already done by the
preprocessor (tested in dEQP)
- Removed unused yyscanner variable from glslang.l
- Ifdefed debug only code in main.cpp
Removed all related muted warnings from BUILD.gn files.
Change-Id: Idf9e7eed00431cc747b689b5d1931fd0c1e8d506
Reviewed-on: https://swiftshader-review.googlesource.com/8010
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nico Weber <thakis@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Wed, 9 Nov 2016 21:47:47 +0000 (16:47 -0500)]
Fix Subzero release builds.
Bug swiftshader:6
Change-Id: I13f9c6d5702ff8debc562ab0c7dc593b4a4a9de5
Reviewed-on: https://swiftshader-review.googlesource.com/7991
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Wed, 12 Oct 2016 19:46:31 +0000 (15:46 -0400)]
Add Subzero vector arithmetic tests.
Change-Id: I440c71fb57f439ab6461609810d32cfb74a892c7
Reviewed-on: https://swiftshader-review.googlesource.com/7590
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Wed, 12 Oct 2016 19:27:04 +0000 (15:27 -0400)]
Use gtest for testing Subzero.
Change-Id: If2a5c51991bd60e1b6545799cd50f9520c85f21e
Reviewed-on: https://swiftshader-review.googlesource.com/7570
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Wed, 12 Oct 2016 16:34:02 +0000 (12:34 -0400)]
Add googletest as a submodule.
Change-Id: I8ebd26ce53930b60892bcf4e2378fb587df08da6
Reviewed-on: https://swiftshader-review.googlesource.com/7550
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Wed, 12 Oct 2016 17:17:24 +0000 (13:17 -0400)]
Revert "Removed Subzero compilation from SwiftShader solution"
It caused building Subzero individually to fail. Instead I've added
a header which will get included when the submodule is not present
and generates an error. The LLVM dependencies were split off into a
separate project to make this work.
This reverts commit
d5d886eb1c5502c2b976388742b2bb50d4d0ce65.
Change-Id: Ie80a02e20ac67d6a4e0984e1fbab84b880a03469
Reviewed-on: https://swiftshader-review.googlesource.com/7611
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Wed, 5 Oct 2016 21:08:49 +0000 (17:08 -0400)]
Removed Subzero compilation from SwiftShader solution
Removed Visual Studio compilation of Subzero and related tests from
the SwiftShader solution so that building the Solution no longer
attempts to build Subzero, which currently doesn't build in Visual
Studio.
Change-Id: Icde9f9ceb90b46681ce8d6019c8151317f84ad17
Reviewed-on: https://swiftshader-review.googlesource.com/7491
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
Alexis Hetu [Wed, 5 Oct 2016 21:03:30 +0000 (17:03 -0400)]
Adding functionality to stencils
Two minor features are required for the blitFramebuffer
implementation in OpenGL ES 3:
- lockStencil with x,y coordinates
- getting the stencil format (new getStencilFormat function)
Change-Id: I83ccccefe70dbbedd05b5d82bc75d30f689c4abe
Reviewed-on: https://swiftshader-review.googlesource.com/7490
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Fri, 30 Sep 2016 18:46:24 +0000 (14:46 -0400)]
Implement generic vector shuffle.
Bug swiftshader:15
Change-Id: I6cfb3218a9962ca9fe271e9595ecf56aaca6375d
Reviewed-on: https://swiftshader-review.googlesource.com/7398
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Fri, 30 Sep 2016 18:23:47 +0000 (14:23 -0400)]
Refactor vector swizzle.
Bug swiftshader:15
Change-Id: Iaa626705220e4bd9b3c744c7623f8b204022b716
Reviewed-on: https://swiftshader-review.googlesource.com/7397
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Fri, 30 Sep 2016 15:44:14 +0000 (11:44 -0400)]
Implement vector extract, insert, and swizzle.
Bug swiftshader:15
Change-Id: I81f88999e183ce3617d923249335ff02d6a9f1b1
Reviewed-on: https://swiftshader-review.googlesource.com/7396
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Fri, 30 Sep 2016 15:37:28 +0000 (11:37 -0400)]
Refactor vector operations.
Subzero does not know the element types of vectors, so pass it as an
argument. Also deprecate createSwizzle() and createMask() from
Nucleus since we only need Float4 Swizzle().
Bug swiftshader:15
Change-Id: I38b630f48f8f43e1248338d564a7406d7c8cd5ef
Reviewed-on: https://swiftshader-review.googlesource.com/7395
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Fri, 30 Sep 2016 08:42:43 +0000 (04:42 -0400)]
Implement pointer arithmetic.
Bug swiftshader:11
Change-Id: I50bb9c6bf7bbe21630bd5f1eb5e0aa0aeb06fdb3
Reviewed-on: https://swiftshader-review.googlesource.com/7393
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Fri, 30 Sep 2016 09:04:21 +0000 (05:04 -0400)]
Implement cast operations.
Bug swiftshader:6
Change-Id: I12e1c109c5954ef65ea00750c2d5b027c0c7765a
Reviewed-on: https://swiftshader-review.googlesource.com/7394
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Fri, 30 Sep 2016 08:15:22 +0000 (04:15 -0400)]
Add type information to pointer arguments.
Unlike LLVM, Subzero does not store the type of value a pointer
references as part of the pointer's type information. So add a type
argument to createGEP(). Also add the type to createStore(), to
enable smaller types to be emulated by larger ones.
Bug swiftshader:11
Change-Id: I08173dd0ba07362d2b27baff4a8fba0ecce093d2
Reviewed-on: https://swiftshader-review.googlesource.com/7392
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Fri, 30 Sep 2016 07:49:05 +0000 (03:49 -0400)]
Fix missing Register() entry function for OpenGL ES 1.1.
Change-Id: I43c782a244996aac7bbafd9cb857a3063a68b5a1
Reviewed-on: https://swiftshader-review.googlesource.com/7391
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Thu, 29 Sep 2016 17:39:44 +0000 (13:39 -0400)]
Implement basic arithmetic operations.
Bug swiftshader:6
Change-Id: Ib60cdecf28027687271d2456c6aae79065fb9804
Reviewed-on: https://swiftshader-review.googlesource.com/7364
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Wed, 28 Sep 2016 20:45:04 +0000 (16:45 -0400)]
Implement support for For loops.
Bug swiftshader:13
Change-Id: I054d0521ecbb1959c5c19b6fa54f76707f4e49c9
Reviewed-on: https://swiftshader-review.googlesource.com/7358
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Thu, 29 Sep 2016 02:36:28 +0000 (22:36 -0400)]
Support assigning constants to values.
Subzero has unrelated types for constants and variables. Both are
operands to instructions, but we can't express this relationship at
the Nucleus level. We'd require a large number of Value to Operand
conversions. Instead, an Assign instruction is provided to convert
a Constant into a Value.
Bug swiftshader:12
Change-Id: Ie35a2cea3e485c4012ed949f92825a41caca3367
Reviewed-on: https://swiftshader-review.googlesource.com/7370
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Thu, 29 Sep 2016 02:34:26 +0000 (22:34 -0400)]
Make LValue a template class.
This avoids having to store the type as a member field.
Bug swiftshader:12
Change-Id: I53ea4869a5b590027217d1e9cc015c0502ab530f
Reviewed-on: https://swiftshader-review.googlesource.com/7361
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Wed, 28 Sep 2016 20:11:54 +0000 (16:11 -0400)]
Use Value null pointers for dummy RValues.
This refactoring paves the way for the next patch to support
constructing RValues from Constant pointers as well.
Bug swiftshader:12
Change-Id: I26df3da13314de556dc1af40388278d144560b97
Reviewed-on: https://swiftshader-review.googlesource.com/7371
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Thu, 29 Sep 2016 15:16:40 +0000 (11:16 -0400)]
No longer ignoring filter option in glBlitFramebuffer
"filter" option was ignored. Simply added the argument
to the context function to fix the issue.
Change-Id: I108c4128bbc4f319091f082df96e056057f926fe
Reviewed-on: https://swiftshader-review.googlesource.com/7363
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Thu, 29 Sep 2016 15:12:35 +0000 (11:12 -0400)]
Fixed flipX in Device::copyBuffer
When x was flipped, the entire row would be copied in the
reverse byte order, which was wrong for any type with pixels
larger than 1 byte. Now the full pixels are copied in the
reverse order instead of the bytes, so pixels are no longer
byte flipped.
Change-Id: Ie0e0516546a49d0f890a4abe24d44ccb3ffb2350
Reviewed-on: https://swiftshader-review.googlesource.com/7362
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Wed, 28 Sep 2016 21:54:05 +0000 (17:54 -0400)]
Sampler object fix
The code was not allowing to unset a sampler object from a texture,
so the faulty condition was removed to fix the issue.
Fixes 30 tests in:
dEQP.functional.samplers.*
Change-Id: Ibbc3389d3d6135db7bc5a2f87f0df5527b78c7fd
Reviewed-on: https://swiftshader-review.googlesource.com/7360
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Tue, 27 Sep 2016 18:18:07 +0000 (14:18 -0400)]
Implement Pointer<> support for Subzero.
Bug swiftshader:11
Change-Id: I794ef54a7c2ecde71ee6344c63955d2f838ff189
Reviewed-on: https://swiftshader-review.googlesource.com/7331
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Mon, 26 Sep 2016 19:09:10 +0000 (15:09 -0400)]
Implement initial Subzero based Reactor.
Bug swiftshader:6
Change-Id: I1de2fe8983c7b8d29e0295e5b4705697e5dd6df1
Reviewed-on: https://swiftshader-review.googlesource.com/7292
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Mon, 26 Sep 2016 19:02:51 +0000 (15:02 -0400)]
Add LLVM dependencies for Subzero.
Change-Id: I5ab054a5622c9f9dee099f5a3a30c3bb4079ffeb
Reviewed-on: https://swiftshader-review.googlesource.com/7291
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Mon, 26 Sep 2016 19:02:08 +0000 (15:02 -0400)]
Add Subzero as submodule.
Change-Id: I7eb124ce596d2c7e2419a01a995ea6fa871c8a88
Reviewed-on: https://swiftshader-review.googlesource.com/7290
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Wed, 28 Sep 2016 14:36:57 +0000 (10:36 -0400)]
Don't return values from terminator instructions.
All LLVM instructions are LLVM values, but in the case of terminator
instructions their value is meaningless, and we don't use them.
Bug swiftshader:10
Change-Id: I9eb71e1dcea2614cb810021dfbf3c8908a7e2510
Reviewed-on: https://swiftshader-review.googlesource.com/7355
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Tue, 27 Sep 2016 14:49:52 +0000 (10:49 -0400)]
Reduce header dependencies.
This removes all Common headers from Reactor headers, making it
easier to use Reactor outside of SwiftShader.
Bug swiftshader:10
Change-Id: I35c5d138e781d4e911d206954d38e392714d4659
Reviewed-on: https://swiftshader-review.googlesource.com/7330
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Mon, 26 Sep 2016 17:44:20 +0000 (13:44 -0400)]
Rename Nucleus.cpp to LLVMReactor.cpp.
Bug swiftshader:10
Change-Id: I258fc7d66988c5bb9a20f98ac33e87ae26379855
Reviewed-on: https://swiftshader-review.googlesource.com/7280
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Mon, 26 Sep 2016 17:30:14 +0000 (13:30 -0400)]
Move Reactor type definitions to Reactor.hpp.
Just a refactoring, to make it clearer that Reactor types are the
higher level abstraction, with Nucleus the intermediate interface.
Bug swiftshader:10
Change-Id: I87d8a03cd05d7847511692c5ac9862e77d670801
Reviewed-on: https://swiftshader-review.googlesource.com/7279
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Wed, 28 Sep 2016 20:56:36 +0000 (16:56 -0400)]
Abstract the Routine class.
Bug swiftshader:10
Change-Id: I29b1de8c1adb67449a380c307d12e2aea21f32cc
Reviewed-on: https://swiftshader-review.googlesource.com/7251
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Thu, 22 Sep 2016 17:20:57 +0000 (13:20 -0400)]
Deprecate DLL precaching support.
It has bitrotted and should be reimplemented with support from the
Reactor back-end if needed again.
Bug swiftshader:10
Change-Id: Ie926903ccd8117e91b9d13bf031a7b88287e7276
Reviewed-on: https://swiftshader-review.googlesource.com/7250
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Mon, 26 Sep 2016 15:45:17 +0000 (11:45 -0400)]
Remove createCall() from the interface.
It's only used for creating intrinsics calls, which is an
implementation detail.
Bug swiftshader:10
Change-Id: Ieac1303e08571e265e239e74c6ea84ece99b53e1
Reviewed-on: https://swiftshader-review.googlesource.com/7278
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Nicolas Capens [Mon, 26 Sep 2016 14:32:29 +0000 (10:32 -0400)]
Abstract llvm::Value usage.
Bug swiftshader:10
Change-Id: Ide80a6d97f67ae04d9118307984235f8f4c2e3ad
Reviewed-on: https://swiftshader-review.googlesource.com/7277
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Sun, 25 Sep 2016 19:42:58 +0000 (15:42 -0400)]
Abstract llvm::Constant usage.
Bug swiftshader:10
Change-Id: Iaed1c9a078b82516db67fe0de287e7ea0362dc03
Reviewed-on: https://swiftshader-review.googlesource.com/7276
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Sun, 25 Sep 2016 19:02:52 +0000 (15:02 -0400)]
Abstract llvm::BasicBlock usage.
Bug swiftshader:10
Change-Id: Ib45d459aa4f68e572b1deaa03e0aaf83002b7881
Reviewed-on: https://swiftshader-review.googlesource.com/7275
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Tue, 20 Sep 2016 18:30:06 +0000 (14:30 -0400)]
Abstract llvm::Type usage.
Bug swiftshader:10
Change-Id: I86b80cb03ff48ff7273aaf23a8e4995b3436f825
Reviewed-on: https://swiftshader-review.googlesource.com/7274
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Fri, 23 Sep 2016 21:37:27 +0000 (17:37 -0400)]
Eliminate llvm::ConstantInt and llvm::GlobalValue exposure.
Use only llvm::Constant in the interface instead.
Bug swiftshader:10
Change-Id: Ideb2ed1ee083e4e6896c4bc8e8830ea02972b487
Reviewed-on: https://swiftshader-review.googlesource.com/7273
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Fri, 23 Sep 2016 20:45:13 +0000 (16:45 -0400)]
Move Nucleus statics to implementation side globals.
Bug swiftshader:10
Change-Id: I69105d8287e52f0f0573c45c59958994a56fc0af
Reviewed-on: https://swiftshader-review.googlesource.com/7214
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Tue, 20 Sep 2016 19:46:16 +0000 (15:46 -0400)]
Move MMX class to the implementation side.
Bug swiftshader:10
Change-Id: I24fc66248bd2f66d2e8bc2b2a15e6c8fadc47efb
Reviewed-on: https://swiftshader-review.googlesource.com/7213
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Wed, 28 Sep 2016 19:52:21 +0000 (15:52 -0400)]
Android build fix
"false" could not be converted to a pointer type. Changed it to nullptr.
Also changed a few other "return 0" to "return nullptr".
Change-Id: Idd4573d4627bb89f1b79e3b21de5af5bd6063916
Reviewed-on: https://swiftshader-review.googlesource.com/7357
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
Alexis Hetu [Wed, 28 Sep 2016 00:50:45 +0000 (20:50 -0400)]
Fixed array constructors
Fixed first class array constructors by allowing basic type
arrays and structure arrays to be handled properly for the
EOpConstruct* operations.
This fixes all dEQP.functional.shaders.arrays.* tests.
Change-Id: I4fe99ec5256abf6483d3595890ba9c426abc97f8
Reviewed-on: https://swiftshader-review.googlesource.com/7351
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Wed, 28 Sep 2016 18:16:44 +0000 (14:16 -0400)]
Fixing Linux build
There was an ambiguous type warning between Float4 and RValue<Float4>.
Change-Id: I526fc2430a66b8545e81fe5ae97fb423e7f01aec
Reviewed-on: https://swiftshader-review.googlesource.com/7356
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
Alexis Hetu [Wed, 28 Sep 2016 12:44:22 +0000 (08:44 -0400)]
Fixed Float4 -> UInt4 conversion
It appears the Nucleus::createFPToUI function is broken and does
not yield the correct values for one pixel out of 4 when the f2u
operation is used. By manually rewriting the conversion using
signed int conversion and some arithmetic, the issue is solved.
This fixes at least 130 failures and also fixes many other tests
which were passing only due to the threshold being too lenient,
but which were showing obvious visual artefacts.
This affects, to the very least:
dEQP.functional.fbo.blit.conversion
dEQP.functional.shaders.functions.datatypes
dEQP.functional.shaders.operator.binary_operator
... and any other test using the f2u operation.
Change-Id: If38dad6b6ae8198f40e863d0847fa5080a2997e3
Reviewed-on: https://swiftshader-review.googlesource.com/7354
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Wed, 28 Sep 2016 01:06:00 +0000 (21:06 -0400)]
Added missing types to PixelProgram::clampColor
A few types were missing: 8b/16b, signed/unsigned integers
Change-Id: I1c168b5df941f6c01801406ba7879221b682fb96
Reviewed-on: https://swiftshader-review.googlesource.com/7353
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Thu, 22 Sep 2016 19:36:45 +0000 (15:36 -0400)]
Fix for the remaining vertex array issues
Fixes all failures in dEQP.functional.vertex_arrays.*
In OpenGL ES 3.0, vertex attributes streams can be of a
different type from the vertex attribute in the shader.
For this reason, some conversion may be required. This
cl solves this issue by:
1) Sending the information about the vertex attribute's
type in the shader to the vertex routine.
2) Handling this information by adding conversion where
appropriate.
Change-Id: I04a5a34aea12684209e584aa5f15a3edfd57f956
Reviewed-on: https://swiftshader-review.googlesource.com/7254
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Fri, 23 Sep 2016 18:49:35 +0000 (14:49 -0400)]
Give SwiftShader libraries a unique name on Mac
It appears that some bundling operations on Mac actually
require that all libraries have a unique name, since
output_dir is effectively ignored and overwritten in that
scenario, so I have to remove that renaming code on Mac so
that SwiftShader doesn't clash with Angle.
Change-Id: I3d36df525ad9229da0c35f27d367e7deef7e430d
Reviewed-on: https://swiftshader-review.googlesource.com/7271
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Meng-Lin Wu [Fri, 10 Jun 2016 18:18:41 +0000 (14:18 -0400)]
Added constructor Int4(RValue<Byte4>) and Int4(RValue<SByte4>) to Nucleus.
To avoid duplicating code, Float4(RValue<Byte4>) and Float4(RValue<SByte4>) now call Int4(RValue<Byte4>) and Int4(RValue<SByte4>) respectively.
Change-Id: Ic49fdd151d15cc1c2753f535d3654028e7a1910a
Reviewed-on: https://swiftshader-review.googlesource.com/5560
Tested-by: Meng-Lin Wu <marleymoo@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Wed, 21 Sep 2016 17:47:42 +0000 (13:47 -0400)]
Keeping only the data_deps change to BUILD.gn files
It appears this issue might be fixable directly in chromium:
(https://codereview.chromium.org/
2359913002/)
For now, removing the mac specific change.
BUG=
31645700
Change-Id: I3d43c01f2d6500d67a298a047e8d98153f06dfb4
Reviewed-on: https://swiftshader-review.googlesource.com/7230
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Alexis Hetu [Wed, 21 Sep 2016 13:11:44 +0000 (09:11 -0400)]
Fixed a uniform buffer regression
The following cl had broken all fragment uniform buffers:
https://swiftshader-review.googlesource.com/6950
Since the null pointer check was only made on the vertex
uniform buffer, it was preventing the fragment uniform
buffer from being set, which was causing a crash when this
happened.
There was a second issue with this cl, which was allowing
'uniformBuffers[-1].get()' to be called, which should not
have been allowed.
Also, it is safer to call VertexProcessor::setUniformBuffer
and PixelProcessor::setUniformBuffer unconditionally in order
to set the null pointers correctly when no buffers are set.
Change-Id: I275b0bca6173ee3df4e0e369926ed0a94500e1ba
Reviewed-on: https://swiftshader-review.googlesource.com/7216
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Wed, 21 Sep 2016 14:16:42 +0000 (10:16 -0400)]
Fixed how SwiftShader is compiled on different platforms
Since the swiftshader libraries are loaded at runtime
by chromium, the correct way to add swiftshader as a
dependency is to use 'loadable_module' for mac and
'data_deps' for other platforms.
BUG=
31645700
Change-Id: Ic393a4132fbfc44e71247fc0294cca2cb57d35c8
Reviewed-on: https://swiftshader-review.googlesource.com/7217
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Tue, 13 Sep 2016 22:41:27 +0000 (18:41 -0400)]
Added RG8 fragment output format
Tying up loose ends from the new output formats project.
One of the missing outputs was the RG8 format, which I added here.
Change-Id: I865ad4c462e892dbc3a7820003b2390b54453ee9
Reviewed-on: https://swiftshader-review.googlesource.com/7171
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Alexis Hetu [Thu, 15 Sep 2016 21:54:05 +0000 (17:54 -0400)]
Fixed R8I and R8UI fragment output formats
There was a silly mistake in the code that I just found.
Instead of being ordered (1,2,3,4), the 4 pixels being
outputted were ordered (3,4,1,2), which was within the
tolerance threshold for most of the image, but exhibited
weird sparse diagonal lines of errors (values outside of
threshold). Reordered the pixels properly to fix the issue.
Change-Id: I082463d22e585e5ee98836a87ef60efca05e58f0
Reviewed-on: https://swiftshader-review.googlesource.com/7192
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Nicolas Capens [Thu, 15 Sep 2016 13:32:16 +0000 (09:32 -0400)]
Add Direct3D 8 implementation.
Bug swiftshader:5
Change-Id: I6aec7237f2db6222702e828a2b9dae1a1a6ac9af
Reviewed-on: https://swiftshader-review.googlesource.com/7191
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>