aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2014-06-20 14:52:43 +0100
committerTorne (Richard Coles) <torne@google.com>2014-06-20 14:52:43 +0100
commitef1ced8c449ef574816fcf6b46bdb7a5812eae18 (patch)
treeee7200173a30ff01e1ffcb92a7b795d3b44259e3
parentefbf84502b817d83b9ba7eddddb2809f2e2dc346 (diff)
parent9132e9e7b63aa8f1a79d08b9ef68019d157dddb6 (diff)
downloadangle-ef1ced8c449ef574816fcf6b46bdb7a5812eae18.tar.gz
Merge from Chromium at DEPS revision 278205
This commit was generated by merge_to_master.py. Change-Id: I016fbe8e01bab3ca5a1fcbe244273d22df883ff5
-rw-r--r--projects/samples/dds_to_header.vcxproj4
-rw-r--r--projects/samples/essl_to_glsl.vcxproj4
-rw-r--r--projects/samples/essl_to_hlsl.vcxproj4
-rw-r--r--projects/samples/hello_triangle.vcxproj4
-rw-r--r--projects/samples/mip_map_2d.vcxproj4
-rw-r--r--projects/samples/multi_texture.vcxproj4
-rw-r--r--projects/samples/multiple_draw_buffers.vcxproj4
-rw-r--r--projects/samples/particle_system.vcxproj4
-rw-r--r--projects/samples/post_sub_buffer.vcxproj4
-rw-r--r--projects/samples/sample_util.vcxproj4
-rw-r--r--projects/samples/simple_instancing.vcxproj4
-rw-r--r--projects/samples/simple_texture_2d.vcxproj4
-rw-r--r--projects/samples/simple_texture_cubemap.vcxproj4
-rw-r--r--projects/samples/simple_vertex_shader.vcxproj4
-rw-r--r--projects/samples/stencil_operations.vcxproj4
-rw-r--r--projects/samples/texture_wrap.vcxproj4
-rw-r--r--projects/src/commit_id.vcxproj18
-rw-r--r--projects/src/copy_compiler_dll.vcxproj4
-rw-r--r--projects/src/libEGL.vcxproj4
-rw-r--r--projects/src/libGLESv2.vcxproj6
-rw-r--r--projects/src/libGLESv2.vcxproj.filters6
-rw-r--r--projects/src/preprocessor.vcxproj4
-rw-r--r--projects/src/translator.vcxproj4
-rw-r--r--projects/src/translator_lib.vcxproj4
-rw-r--r--projects/src/translator_static.vcxproj4
-rw-r--r--src/compiler/translator/OutputHLSL.cpp84
-rw-r--r--src/compiler/translator/OutputHLSL.h8
-rw-r--r--src/compiler/translator/ParseContext.cpp2
-rw-r--r--src/compiler/translator/SymbolTable.cpp26
-rw-r--r--src/compiler/translator/SymbolTable.h32
-rw-r--r--src/compiler/translator/Types.h16
-rw-r--r--src/compiler/translator/glslang.y2
-rw-r--r--src/compiler/translator/glslang_tab.cpp28
-rw-r--r--src/libGLESv2/Context.cpp58
-rw-r--r--src/libGLESv2/Context.h6
-rw-r--r--src/libGLESv2/Framebuffer.cpp70
-rw-r--r--src/libGLESv2/Framebuffer.h24
-rw-r--r--src/libGLESv2/FramebufferAttachment.cpp491
-rw-r--r--src/libGLESv2/FramebufferAttachment.h247
-rw-r--r--src/libGLESv2/Renderbuffer.cpp467
-rw-r--r--src/libGLESv2/Renderbuffer.h219
-rw-r--r--src/libGLESv2/RenderbufferProxySet.cpp10
-rw-r--r--src/libGLESv2/RenderbufferProxySet.h14
-rw-r--r--src/libGLESv2/ResourceManager.cpp6
-rw-r--r--src/libGLESv2/ResourceManager.h8
-rw-r--r--src/libGLESv2/Texture.cpp80
-rw-r--r--src/libGLESv2/Texture.h24
-rw-r--r--src/libGLESv2/libGLESv2.cpp74
-rw-r--r--src/libGLESv2/renderer/d3d11/Clear11.cpp30
-rw-r--r--src/libGLESv2/renderer/d3d11/Image11.cpp2
-rw-r--r--src/libGLESv2/renderer/d3d11/RenderStateCache.cpp12
-rw-r--r--src/libGLESv2/renderer/d3d11/RenderTarget11.cpp27
-rw-r--r--src/libGLESv2/renderer/d3d11/Renderer11.cpp47
-rw-r--r--src/libGLESv2/renderer/d3d11/Renderer11.h6
-rw-r--r--src/libGLESv2/renderer/d3d9/Blit9.cpp4
-rw-r--r--src/libGLESv2/renderer/d3d9/Image9.cpp2
-rw-r--r--src/libGLESv2/renderer/d3d9/Renderer9.cpp28
-rw-r--r--src/libGLESv2/renderer/d3d9/Renderer9.h6
-rw-r--r--src/libGLESv2/validationES.cpp208
-rw-r--r--src/libGLESv2/validationES.h4
-rw-r--r--src/libGLESv2/validationES2.cpp120
-rw-r--r--src/libGLESv2/validationES3.cpp186
-rw-r--r--src/preprocessor.target.darwin-arm.mk4
-rw-r--r--src/preprocessor.target.darwin-arm64.mk4
-rw-r--r--src/preprocessor.target.darwin-mips.mk4
-rw-r--r--src/preprocessor.target.darwin-x86.mk4
-rw-r--r--src/preprocessor.target.darwin-x86_64.mk4
-rw-r--r--src/preprocessor.target.linux-arm.mk4
-rw-r--r--src/preprocessor.target.linux-arm64.mk4
-rw-r--r--src/preprocessor.target.linux-mips.mk4
-rw-r--r--src/preprocessor.target.linux-x86.mk4
-rw-r--r--src/preprocessor.target.linux-x86_64.mk4
-rw-r--r--src/translator.target.darwin-arm.mk4
-rw-r--r--src/translator.target.darwin-arm64.mk4
-rw-r--r--src/translator.target.darwin-mips.mk4
-rw-r--r--src/translator.target.darwin-x86.mk4
-rw-r--r--src/translator.target.darwin-x86_64.mk4
-rw-r--r--src/translator.target.linux-arm.mk4
-rw-r--r--src/translator.target.linux-arm64.mk4
-rw-r--r--src/translator.target.linux-mips.mk4
-rw-r--r--src/translator.target.linux-x86.mk4
-rw-r--r--src/translator.target.linux-x86_64.mk4
-rw-r--r--src/translator_lib.target.darwin-arm.mk4
-rw-r--r--src/translator_lib.target.darwin-arm64.mk4
-rw-r--r--src/translator_lib.target.darwin-mips.mk4
-rw-r--r--src/translator_lib.target.darwin-x86.mk4
-rw-r--r--src/translator_lib.target.darwin-x86_64.mk4
-rw-r--r--src/translator_lib.target.linux-arm.mk4
-rw-r--r--src/translator_lib.target.linux-arm64.mk4
-rw-r--r--src/translator_lib.target.linux-mips.mk4
-rw-r--r--src/translator_lib.target.linux-x86.mk4
-rw-r--r--src/translator_lib.target.linux-x86_64.mk4
-rw-r--r--tests/angle_tests/GLSLStructTest.cpp116
93 files changed, 1642 insertions, 1390 deletions
diff --git a/projects/samples/dds_to_header.vcxproj b/projects/samples/dds_to_header.vcxproj
index e83ab9d0..fc3e2277 100644
--- a/projects/samples/dds_to_header.vcxproj
+++ b/projects/samples/dds_to_header.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/essl_to_glsl.vcxproj b/projects/samples/essl_to_glsl.vcxproj
index dd1b0c55..8b7b3771 100644
--- a/projects/samples/essl_to_glsl.vcxproj
+++ b/projects/samples/essl_to_glsl.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/essl_to_hlsl.vcxproj b/projects/samples/essl_to_hlsl.vcxproj
index 3e9bf4f4..827e6d05 100644
--- a/projects/samples/essl_to_hlsl.vcxproj
+++ b/projects/samples/essl_to_hlsl.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/hello_triangle.vcxproj b/projects/samples/hello_triangle.vcxproj
index fd0aa16c..c45a35b6 100644
--- a/projects/samples/hello_triangle.vcxproj
+++ b/projects/samples/hello_triangle.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/mip_map_2d.vcxproj b/projects/samples/mip_map_2d.vcxproj
index 39b8d23a..f8c9543b 100644
--- a/projects/samples/mip_map_2d.vcxproj
+++ b/projects/samples/mip_map_2d.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/multi_texture.vcxproj b/projects/samples/multi_texture.vcxproj
index 4a988005..2c34b2f6 100644
--- a/projects/samples/multi_texture.vcxproj
+++ b/projects/samples/multi_texture.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/multiple_draw_buffers.vcxproj b/projects/samples/multiple_draw_buffers.vcxproj
index b6b036c5..ac8f4f04 100644
--- a/projects/samples/multiple_draw_buffers.vcxproj
+++ b/projects/samples/multiple_draw_buffers.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/particle_system.vcxproj b/projects/samples/particle_system.vcxproj
index 5e8af644..fb6a6c3c 100644
--- a/projects/samples/particle_system.vcxproj
+++ b/projects/samples/particle_system.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/post_sub_buffer.vcxproj b/projects/samples/post_sub_buffer.vcxproj
index 41c0b2e4..a6768875 100644
--- a/projects/samples/post_sub_buffer.vcxproj
+++ b/projects/samples/post_sub_buffer.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/sample_util.vcxproj b/projects/samples/sample_util.vcxproj
index a7f99db7..ebba90f5 100644
--- a/projects/samples/sample_util.vcxproj
+++ b/projects/samples/sample_util.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4201;4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4201;4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4201;4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4201;4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/simple_instancing.vcxproj b/projects/samples/simple_instancing.vcxproj
index 1004bc0d..d75c8741 100644
--- a/projects/samples/simple_instancing.vcxproj
+++ b/projects/samples/simple_instancing.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/simple_texture_2d.vcxproj b/projects/samples/simple_texture_2d.vcxproj
index 6b8e3ba0..1f883e3c 100644
--- a/projects/samples/simple_texture_2d.vcxproj
+++ b/projects/samples/simple_texture_2d.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/simple_texture_cubemap.vcxproj b/projects/samples/simple_texture_cubemap.vcxproj
index 3da4a712..344a0c1a 100644
--- a/projects/samples/simple_texture_cubemap.vcxproj
+++ b/projects/samples/simple_texture_cubemap.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/simple_vertex_shader.vcxproj b/projects/samples/simple_vertex_shader.vcxproj
index cd127f25..89fd7056 100644
--- a/projects/samples/simple_vertex_shader.vcxproj
+++ b/projects/samples/simple_vertex_shader.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/stencil_operations.vcxproj b/projects/samples/stencil_operations.vcxproj
index b98b96dc..3797c24c 100644
--- a/projects/samples/stencil_operations.vcxproj
+++ b/projects/samples/stencil_operations.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/samples/texture_wrap.vcxproj b/projects/samples/texture_wrap.vcxproj
index c19e02fc..33d23b69 100644
--- a/projects/samples/texture_wrap.vcxproj
+++ b/projects/samples/texture_wrap.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;4201;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/src/commit_id.vcxproj b/projects/src/commit_id.vcxproj
index dca5a3b4..a73f4630 100644
--- a/projects/src/commit_id.vcxproj
+++ b/projects/src/commit_id.vcxproj
@@ -36,14 +36,16 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
+ <AdditionalIncludeDirectories>C:\Program Files (x86)\Windows Kits\8.0\Include\shared;C:\Program Files (x86)\Windows Kits\8.0\Include\um;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT(&quot;d3dcompiler_46.dll&quot;), TEXT(&quot;d3dcompiler_43.dll&quot;) };%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;_HAS_EXCEPTIONS=0;_WINDOWS;WIN32;WIN32_LEAN_AND_MEAN;ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT(&quot;d3dcompiler_46.dll&quot;), TEXT(&quot;d3dcompiler_43.dll&quot;) };NOMINMAX;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError>
@@ -53,7 +55,7 @@
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<Link>
- <AdditionalDependencies></AdditionalDependencies>
+ <AdditionalDependencies>kernel32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<FixedBaseAddress>false</FixedBaseAddress>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -63,19 +65,22 @@
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
+ <AdditionalIncludeDirectories>C:\Program Files (x86)\Windows Kits\8.0\Include\shared;C:\Program Files (x86)\Windows Kits\8.0\Include\um;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Culture>0x0409</Culture>
- <PreprocessorDefinitions>ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT(&quot;d3dcompiler_46.dll&quot;), TEXT(&quot;d3dcompiler_43.dll&quot;) };%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT(&quot;d3dcompiler_46.dll&quot;), TEXT(&quot;d3dcompiler_43.dll&quot;) };NOMINMAX;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
+ <AdditionalIncludeDirectories>C:\Program Files (x86)\Windows Kits\8.0\Include\shared;C:\Program Files (x86)\Windows Kits\8.0\Include\um;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
- <PreprocessorDefinitions>ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT(&quot;d3dcompiler_46.dll&quot;), TEXT(&quot;d3dcompiler_43.dll&quot;) };%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;_HAS_EXCEPTIONS=0;_WINDOWS;WIN32;WIN32_LEAN_AND_MEAN;ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT(&quot;d3dcompiler_46.dll&quot;), TEXT(&quot;d3dcompiler_43.dll&quot;) };NOMINMAX;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError>
@@ -85,7 +90,7 @@
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Lib>
<Link>
- <AdditionalDependencies></AdditionalDependencies>
+ <AdditionalDependencies>kernel32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;user32.lib;uuid.lib;odbc32.lib;odbccp32.lib;delayimp.lib</AdditionalDependencies>
<AdditionalLibraryDirectories>C:/Program Files (x86)/Windows Kits/8.0/Lib/win8/um/x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<FixedBaseAddress>false</FixedBaseAddress>
<GenerateDebugInformation>false</GenerateDebugInformation>
@@ -95,8 +100,9 @@
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
+ <AdditionalIncludeDirectories>C:\Program Files (x86)\Windows Kits\8.0\Include\shared;C:\Program Files (x86)\Windows Kits\8.0\Include\um;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Culture>0x0409</Culture>
- <PreprocessorDefinitions>ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT(&quot;d3dcompiler_46.dll&quot;), TEXT(&quot;d3dcompiler_43.dll&quot;) };%(PreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT(&quot;d3dcompiler_46.dll&quot;), TEXT(&quot;d3dcompiler_43.dll&quot;) };NOMINMAX;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/projects/src/copy_compiler_dll.vcxproj b/projects/src/copy_compiler_dll.vcxproj
index 207a0f02..010887f2 100644
--- a/projects/src/copy_compiler_dll.vcxproj
+++ b/projects/src/copy_compiler_dll.vcxproj
@@ -41,7 +41,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -76,7 +76,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/src/libEGL.vcxproj b/projects/src/libEGL.vcxproj
index 61a27abb..71c8ab12 100644
--- a/projects/src/libEGL.vcxproj
+++ b/projects/src/libEGL.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -79,7 +79,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/src/libGLESv2.vcxproj b/projects/src/libGLESv2.vcxproj
index f817c9b5..6ab232fd 100644
--- a/projects/src/libGLESv2.vcxproj
+++ b/projects/src/libGLESv2.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -79,7 +79,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
@@ -152,6 +152,7 @@
<ClInclude Include="..\..\src\libGLESv2\Fence.h"/>
<ClInclude Include="..\..\src\libGLESv2\angletypes.h"/>
<ClInclude Include="..\..\src\libGLESv2\main.h"/>
+ <ClInclude Include="..\..\src\libGLESv2\FramebufferAttachment.h"/>
<ClInclude Include="..\..\src\libGLESv2\Framebuffer.h"/>
<ClInclude Include="..\..\src\libGLESv2\formatutils.h"/>
<ClInclude Include="..\..\src\libGLESv2\renderer\IndexDataManager.h"/>
@@ -304,6 +305,7 @@
<ClCompile Include="..\..\src\libGLESv2\Float16ToFloat32.cpp"/>
<ClCompile Include="..\..\src\libGLESv2\ResourceManager.cpp"/>
<ClCompile Include="..\..\src\libGLESv2\validationES3.cpp"/>
+ <ClCompile Include="..\..\src\libGLESv2\FramebufferAttachment.cpp"/>
<ClCompile Include="..\..\src\libGLESv2\Query.cpp"/>
<ClCompile Include="..\..\src\libGLESv2\libGLESv2.cpp"/>
<ClCompile Include="..\..\src\libGLESv2\formatutils.cpp"/>
diff --git a/projects/src/libGLESv2.vcxproj.filters b/projects/src/libGLESv2.vcxproj.filters
index 8a522b1e..bee94915 100644
--- a/projects/src/libGLESv2.vcxproj.filters
+++ b/projects/src/libGLESv2.vcxproj.filters
@@ -153,6 +153,9 @@
<ClInclude Include="..\..\src\libGLESv2\Buffer.h">
<Filter>src\libGLESv2</Filter>
</ClInclude>
+ <ClCompile Include="..\..\src\libGLESv2\FramebufferAttachment.cpp">
+ <Filter>src\libGLESv2</Filter>
+ </ClCompile>
<ClInclude Include="..\..\src\libGLESv2\RenderbufferProxySet.h">
<Filter>src\libGLESv2</Filter>
</ClInclude>
@@ -231,6 +234,9 @@
<ClCompile Include="..\..\src\libGLESv2\ProgramBinary.cpp">
<Filter>src\libGLESv2</Filter>
</ClCompile>
+ <ClInclude Include="..\..\src\libGLESv2\FramebufferAttachment.h">
+ <Filter>src\libGLESv2</Filter>
+ </ClInclude>
<ClCompile Include="..\..\src\libGLESv2\Sampler.cpp">
<Filter>src\libGLESv2</Filter>
</ClCompile>
diff --git a/projects/src/preprocessor.vcxproj b/projects/src/preprocessor.vcxproj
index 62daae10..0b702e23 100644
--- a/projects/src/preprocessor.vcxproj
+++ b/projects/src/preprocessor.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/src/translator.vcxproj b/projects/src/translator.vcxproj
index 61a8b16e..a5e97fde 100644
--- a/projects/src/translator.vcxproj
+++ b/projects/src/translator.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/src/translator_lib.vcxproj b/projects/src/translator_lib.vcxproj
index 5e8e6601..26886850 100644
--- a/projects/src/translator_lib.vcxproj
+++ b/projects/src/translator_lib.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -79,7 +79,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/projects/src/translator_static.vcxproj b/projects/src/translator_static.vcxproj
index da725ce1..6c943aae 100644
--- a/projects/src/translator_static.vcxproj
+++ b/projects/src/translator_static.vcxproj
@@ -42,7 +42,7 @@
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization>
@@ -78,7 +78,7 @@
<AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4100;4127;4189;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <DisableSpecificWarnings>4100;4127;4239;4244;4245;4512;4702;4530;4718;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<FunctionLevelLinking>true</FunctionLevelLinking>
<MinimalRebuild>false</MinimalRebuild>
<Optimization>MaxSpeed</Optimization>
diff --git a/src/compiler/translator/OutputHLSL.cpp b/src/compiler/translator/OutputHLSL.cpp
index 2d7818b6..ea0045f0 100644
--- a/src/compiler/translator/OutputHLSL.cpp
+++ b/src/compiler/translator/OutputHLSL.cpp
@@ -136,8 +136,6 @@ OutputHLSL::OutputHLSL(TParseContext &context, const ShBuiltInResources& resourc
mNumRenderTargets = resources.EXT_draw_buffers ? resources.MaxDrawBuffers : 1;
- mScopeDepth = 0;
-
mUniqueIndex = 0;
mContainsLoopDiscontinuity = false;
@@ -2257,17 +2255,6 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
{
outputLineDirective(node->getLine().first_line);
out << "{\n";
-
- mScopeDepth++;
-
- if (mScopeBracket.size() < mScopeDepth)
- {
- mScopeBracket.push_back(0); // New scope level
- }
- else
- {
- mScopeBracket[mScopeDepth - 1]++; // New scope at existing level
- }
}
for (TIntermSequence::iterator sit = node->getSequence().begin(); sit != node->getSequence().end(); sit++)
@@ -2283,8 +2270,6 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
{
outputLineDirective(node->getLine().last_line);
out << "}\n";
-
- mScopeDepth--;
}
return false;
@@ -2299,7 +2284,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
{
if (variable->getType().getStruct())
{
- addConstructor(variable->getType(), scopedStruct(variable->getType().getStruct()->name()), NULL);
+ addConstructor(variable->getType(), structNameString(*variable->getType().getStruct()), NULL);
}
if (!variable->getAsSymbolNode() || variable->getAsSymbolNode()->getSymbol() != "") // Variable declaration
@@ -2426,7 +2411,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
{
if (symbol->getType().getStruct())
{
- addConstructor(symbol->getType(), scopedStruct(symbol->getType().getStruct()->name()), NULL);
+ addConstructor(symbol->getType(), structNameString(*symbol->getType().getStruct()), NULL);
}
out << argumentString(symbol);
@@ -2694,8 +2679,11 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
outputTriplet(visit, "mat4(", ", ", ")");
break;
case EOpConstructStruct:
- addConstructor(node->getType(), scopedStruct(node->getType().getStruct()->name()), &node->getSequence());
- outputTriplet(visit, structLookup(node->getType().getStruct()->name()) + "_ctor(", ", ", ")");
+ {
+ const TString &structName = structNameString(*node->getType().getStruct());
+ addConstructor(node->getType(), structName, &node->getSequence());
+ outputTriplet(visit, structName + "_ctor(", ", ", ")");
+ }
break;
case EOpLessThan: outputTriplet(visit, "(", " < ", ")"); break;
case EOpGreaterThan: outputTriplet(visit, "(", " > ", ")"); break;
@@ -3320,7 +3308,7 @@ TString OutputHLSL::typeString(const TType &type)
const TString& typeName = structure->name();
if (typeName != "")
{
- return structLookup(typeName);
+ return structNameString(*type.getStruct());
}
else // Nameless structure, define in place
{
@@ -3527,7 +3515,7 @@ TString OutputHLSL::structureTypeName(const TStructure &structure, bool useHLSLR
prefix += "rm";
}
- return prefix + structLookup(structure.name());
+ return prefix + structNameString(structure);
}
void OutputHLSL::addConstructor(const TType &type, const TString &name, const TIntermSequence *parameters)
@@ -3537,7 +3525,7 @@ void OutputHLSL::addConstructor(const TType &type, const TString &name, const TI
return; // Nameless structures don't have constructors
}
- if (type.getStruct() && mStructNames.find(decorate(name)) != mStructNames.end())
+ if (type.getStruct() && mStructNames.find(name) != mStructNames.end())
{
return; // Already added
}
@@ -3547,15 +3535,13 @@ void OutputHLSL::addConstructor(const TType &type, const TString &name, const TI
ctorType.setPrecision(EbpHigh);
ctorType.setQualifier(EvqTemporary);
- TString ctorName = type.getStruct() ? decorate(name) : name;
-
typedef std::vector<TType> ParameterArray;
ParameterArray ctorParameters;
const TStructure* structure = type.getStruct();
if (structure)
{
- mStructNames.insert(decorate(name));
+ mStructNames.insert(name);
const TString &structString = structureString(*structure, false, false);
@@ -3596,11 +3582,11 @@ void OutputHLSL::addConstructor(const TType &type, const TString &name, const TI
if (ctorType.getStruct())
{
- constructor += ctorName + " " + ctorName + "_ctor(";
+ constructor += name + " " + name + "_ctor(";
}
else // Built-in type
{
- constructor += typeString(ctorType) + " " + ctorName + "(";
+ constructor += typeString(ctorType) + " " + name + "(";
}
for (unsigned int parameter = 0; parameter < ctorParameters.size(); parameter++)
@@ -3620,7 +3606,7 @@ void OutputHLSL::addConstructor(const TType &type, const TString &name, const TI
if (ctorType.getStruct())
{
- constructor += " " + ctorName + " structure = {";
+ constructor += " " + name + " structure = {";
}
else
{
@@ -3754,7 +3740,7 @@ const ConstantUnion *OutputHLSL::writeConstantUnion(const TType &type, const Con
const TStructure* structure = type.getStruct();
if (structure)
{
- out << structLookup(structure->name()) + "_ctor(";
+ out << structNameString(*structure) + "_ctor(";
const TFieldList& fields = structure->fields();
@@ -3808,46 +3794,14 @@ const ConstantUnion *OutputHLSL::writeConstantUnion(const TType &type, const Con
return constUnion;
}
-TString OutputHLSL::scopeString(unsigned int depthLimit)
-{
- TString string;
-
- for (unsigned int i = 0; i < mScopeBracket.size() && i < depthLimit; i++)
- {
- string += "_" + str(mScopeBracket[i]);
- }
-
- return string;
-}
-
-TString OutputHLSL::scopedStruct(const TString &typeName)
+TString OutputHLSL::structNameString(const TStructure &structure)
{
- if (typeName == "")
+ if (structure.name().empty())
{
- return typeName;
- }
-
- return typeName + scopeString(mScopeDepth);
-}
-
-TString OutputHLSL::structLookup(const TString &typeName)
-{
- for (int depth = mScopeDepth; depth >= 0; depth--)
- {
- TString scopedName = decorate(typeName + scopeString(depth));
-
- for (StructNames::iterator structName = mStructNames.begin(); structName != mStructNames.end(); structName++)
- {
- if (*structName == scopedName)
- {
- return scopedName;
- }
- }
+ return "";
}
- UNREACHABLE(); // Should have found a matching constructor
-
- return typeName;
+ return "ss_" + str(structure.uniqueId()) + structure.name();
}
TString OutputHLSL::decorate(const TString &string)
diff --git a/src/compiler/translator/OutputHLSL.h b/src/compiler/translator/OutputHLSL.h
index 55d6441b..f681b716 100644
--- a/src/compiler/translator/OutputHLSL.h
+++ b/src/compiler/translator/OutputHLSL.h
@@ -74,9 +74,7 @@ class OutputHLSL : public TIntermTraverser
void addConstructor(const TType &type, const TString &name, const TIntermSequence *parameters);
const ConstantUnion *writeConstantUnion(const TType &type, const ConstantUnion *constUnion);
- TString scopeString(unsigned int depthLimit);
- TString scopedStruct(const TString &typeName);
- TString structLookup(const TString &typeName);
+ TString structNameString(const TStructure &structure);
TParseContext &mContext;
const ShShaderOutput mOutputType;
@@ -162,10 +160,6 @@ class OutputHLSL : public TIntermTraverser
typedef std::list<TString> StructDeclarations;
StructDeclarations mStructDeclarations;
- typedef std::vector<int> ScopeBracket;
- ScopeBracket mScopeBracket;
- unsigned int mScopeDepth;
-
int mUniqueIndex; // For creating unique names
bool mContainsLoopDiscontinuity;
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp
index 8ff9d30e..eac8f2c7 100644
--- a/src/compiler/translator/ParseContext.cpp
+++ b/src/compiler/translator/ParseContext.cpp
@@ -2567,6 +2567,8 @@ TPublicType TParseContext::addStructure(const TSourceLoc& structLine, const TSou
TStructure* structure = new TStructure(structName, fieldList);
TType* structureType = new TType(structure);
+ structure->setUniqueId(TSymbolTable::nextUniqueId());
+
if (!structName->empty())
{
if (reservedErrorCheck(nameLine, *structName))
diff --git a/src/compiler/translator/SymbolTable.cpp b/src/compiler/translator/SymbolTable.cpp
index 5eb04348..aa5933d3 100644
--- a/src/compiler/translator/SymbolTable.cpp
+++ b/src/compiler/translator/SymbolTable.cpp
@@ -18,7 +18,7 @@
#include <stdio.h>
#include <algorithm>
-int TSymbolTableLevel::uniqueId = 0;
+int TSymbolTable::uniqueIdCounter = 0;
//
// Functions have buried pointers to delete.
@@ -38,6 +38,30 @@ TSymbolTableLevel::~TSymbolTableLevel()
delete (*it).second;
}
+bool TSymbolTableLevel::insert(const TString &name, TSymbol &symbol)
+{
+ symbol.setUniqueId(TSymbolTable::nextUniqueId());
+
+ // returning true means symbol was added to the table
+ tInsertResult result = level.insert(tLevelPair(name, &symbol));
+
+ return result.second;
+}
+
+bool TSymbolTableLevel::insert(TSymbol &symbol)
+{
+ return insert(symbol.getMangledName(), symbol);
+}
+
+TSymbol *TSymbolTableLevel::find(const TString &name) const
+{
+ tLevel::const_iterator it = level.find(name);
+ if (it == level.end())
+ return 0;
+ else
+ return (*it).second;
+}
+
//
// Change all function entries in the table with the non-mangled name
// to be related to the provided built-in operation. This is a low
diff --git a/src/compiler/translator/SymbolTable.h b/src/compiler/translator/SymbolTable.h
index 2119d8b2..3f932a45 100644
--- a/src/compiler/translator/SymbolTable.h
+++ b/src/compiler/translator/SymbolTable.h
@@ -288,29 +288,10 @@ class TSymbolTableLevel
}
~TSymbolTableLevel();
- bool insert(const TString &name, TSymbol &symbol)
- {
- symbol.setUniqueId(++uniqueId);
-
- // returning true means symbol was added to the table
- tInsertResult result = level.insert(tLevelPair(name, &symbol));
+ bool insert(const TString &name, TSymbol &symbol);
+ bool insert(TSymbol &symbol);
- return result.second;
- }
-
- bool insert(TSymbol &symbol)
- {
- return insert(symbol.getMangledName(), symbol);
- }
-
- TSymbol *find(const TString &name) const
- {
- tLevel::const_iterator it = level.find(name);
- if (it == level.end())
- return 0;
- else
- return (*it).second;
- }
+ TSymbol *find(const TString &name) const;
void relateToOperator(const char *name, TOperator op);
void relateToExtension(const char *name, const TString &ext);
@@ -429,6 +410,11 @@ class TSymbolTable
// for the specified TBasicType
TPrecision getDefaultPrecision(TBasicType type);
+ static int nextUniqueId()
+ {
+ return ++uniqueIdCounter;
+ }
+
private:
ESymbolLevel currentLevel() const
{
@@ -438,6 +424,8 @@ class TSymbolTable
std::vector<TSymbolTableLevel *> table;
typedef TMap<TBasicType, TPrecision> PrecisionStackLevel;
std::vector< PrecisionStackLevel *> precisionStack;
+
+ static int uniqueIdCounter;
};
#endif // _SYMBOL_TABLE_INCLUDED_
diff --git a/src/compiler/translator/Types.h b/src/compiler/translator/Types.h
index 91c36a65..76297202 100644
--- a/src/compiler/translator/Types.h
+++ b/src/compiler/translator/Types.h
@@ -15,6 +15,7 @@
struct TPublicType;
class TType;
+class TSymbol;
class TField
{
@@ -115,7 +116,8 @@ class TStructure : public TFieldListCollection
POOL_ALLOCATOR_NEW_DELETE();
TStructure(const TString *name, TFieldList *fields)
: TFieldListCollection(name, fields),
- mDeepestNesting(0)
+ mDeepestNesting(0),
+ mUniqueId(0)
{
}
@@ -129,6 +131,17 @@ class TStructure : public TFieldListCollection
bool equals(const TStructure &other) const;
+ void setUniqueId(int uniqueId)
+ {
+ mUniqueId = uniqueId;
+ }
+
+ int uniqueId() const
+ {
+ ASSERT(mUniqueId != 0);
+ return mUniqueId;
+ }
+
private:
DISALLOW_COPY_AND_ASSIGN(TStructure);
virtual TString mangledNamePrefix() const
@@ -138,6 +151,7 @@ class TStructure : public TFieldListCollection
int calculateDeepestNesting() const;
mutable int mDeepestNesting;
+ int mUniqueId;
};
class TInterfaceBlock : public TFieldListCollection
diff --git a/src/compiler/translator/glslang.y b/src/compiler/translator/glslang.y
index 304e4a92..8ebf2d1f 100644
--- a/src/compiler/translator/glslang.y
+++ b/src/compiler/translator/glslang.y
@@ -1255,7 +1255,7 @@ type_specifier
$$ = $2;
$$.precision = $1;
- if (!SupportsPrecision($2.type) {
+ if (!SupportsPrecision($2.type)) {
context->error(@1, "illegal type for precision qualifier", getBasicString($2.type));
context->recover();
}
diff --git a/src/compiler/translator/glslang_tab.cpp b/src/compiler/translator/glslang_tab.cpp
index 4743696d..63ec8c75 100644
--- a/src/compiler/translator/glslang_tab.cpp
+++ b/src/compiler/translator/glslang_tab.cpp
@@ -807,19 +807,19 @@ static const yytype_uint16 yyrline[] =
1064, 1068, 1072, 1079, 1083, 1087, 1094, 1098, 1102, 1123,
1132, 1138, 1141, 1147, 1153, 1160, 1169, 1178, 1186, 1189,
1196, 1200, 1207, 1210, 1214, 1218, 1227, 1236, 1244, 1254,
- 1261, 1264, 1267, 1273, 1280, 1283, 1289, 1292, 1295, 1301,
- 1304, 1319, 1323, 1327, 1331, 1335, 1339, 1344, 1349, 1354,
- 1359, 1364, 1369, 1374, 1379, 1384, 1389, 1394, 1399, 1404,
- 1409, 1414, 1419, 1424, 1429, 1434, 1439, 1444, 1448, 1452,
- 1456, 1460, 1464, 1468, 1472, 1476, 1480, 1484, 1488, 1492,
- 1496, 1500, 1504, 1512, 1520, 1524, 1537, 1537, 1540, 1540,
- 1546, 1549, 1565, 1568, 1577, 1581, 1587, 1594, 1609, 1613,
- 1617, 1618, 1624, 1625, 1626, 1627, 1628, 1632, 1633, 1633,
- 1633, 1643, 1644, 1648, 1648, 1649, 1649, 1654, 1657, 1667,
- 1670, 1676, 1677, 1681, 1689, 1693, 1703, 1708, 1725, 1725,
- 1730, 1730, 1737, 1737, 1745, 1748, 1754, 1757, 1763, 1767,
- 1774, 1781, 1788, 1795, 1806, 1815, 1819, 1826, 1829, 1835,
- 1835
+ 1266, 1269, 1272, 1278, 1285, 1288, 1294, 1297, 1300, 1306,
+ 1309, 1324, 1328, 1332, 1336, 1340, 1344, 1349, 1354, 1359,
+ 1364, 1369, 1374, 1379, 1384, 1389, 1394, 1399, 1404, 1409,
+ 1414, 1419, 1424, 1429, 1434, 1439, 1444, 1449, 1453, 1457,
+ 1461, 1465, 1469, 1473, 1477, 1481, 1485, 1489, 1493, 1497,
+ 1501, 1505, 1509, 1517, 1525, 1529, 1542, 1542, 1545, 1545,
+ 1551, 1554, 1570, 1573, 1582, 1586, 1592, 1599, 1614, 1618,
+ 1622, 1623, 1629, 1630, 1631, 1632, 1633, 1637, 1638, 1638,
+ 1638, 1648, 1649, 1653, 1653, 1654, 1654, 1659, 1662, 1672,
+ 1675, 1681, 1682, 1686, 1694, 1698, 1708, 1713, 1730, 1730,
+ 1735, 1735, 1742, 1742, 1750, 1753, 1759, 1762, 1768, 1772,
+ 1779, 1786, 1793, 1800, 1811, 1820, 1824, 1831, 1834, 1840,
+ 1840
};
#endif
@@ -3939,7 +3939,7 @@ yyreduce:
(yyval.interm.type).precision = (yyvsp[(1) - (2)].interm.precision);
if (!SupportsPrecision((yyvsp[(2) - (2)].interm.type).type)) {
- context->error((yylsp[(1) - (1)]), "illegal type for precision qualifier", getBasicString((yyvsp[(2) - (2)].interm.type).type));
+ context->error((yylsp[(1) - (2)]), "illegal type for precision qualifier", getBasicString((yyvsp[(2) - (2)].interm.type).type));
context->recover();
}
}
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index 79b47c8c..879a5600 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -1105,7 +1105,7 @@ Texture *Context::getTexture(GLuint handle)
return mResourceManager->getTexture(handle);
}
-Renderbuffer *Context::getRenderbuffer(GLuint handle)
+FramebufferAttachment *Context::getRenderbuffer(GLuint handle)
{
return mResourceManager->getRenderbuffer(handle);
}
@@ -1440,7 +1440,7 @@ void Context::setRenderbufferStorage(GLsizei width, GLsizei height, GLenum inter
return;
}
- Renderbuffer *renderbufferObject = mState.renderbuffer.get();
+ FramebufferAttachment *renderbufferObject = mState.renderbuffer.get();
renderbufferObject->setStorage(renderbuffer);
}
@@ -1884,7 +1884,7 @@ void Context::getIntegerv(GLenum pname, GLint *params)
case GL_ALPHA_BITS:
{
gl::Framebuffer *framebuffer = getDrawFramebuffer();
- gl::Renderbuffer *colorbuffer = framebuffer->getFirstColorbuffer();
+ gl::FramebufferAttachment *colorbuffer = framebuffer->getFirstColorbuffer();
if (colorbuffer)
{
@@ -1905,7 +1905,7 @@ void Context::getIntegerv(GLenum pname, GLint *params)
case GL_DEPTH_BITS:
{
gl::Framebuffer *framebuffer = getDrawFramebuffer();
- gl::Renderbuffer *depthbuffer = framebuffer->getDepthbuffer();
+ gl::FramebufferAttachment *depthbuffer = framebuffer->getDepthbuffer();
if (depthbuffer)
{
@@ -1920,7 +1920,7 @@ void Context::getIntegerv(GLenum pname, GLint *params)
case GL_STENCIL_BITS:
{
gl::Framebuffer *framebuffer = getDrawFramebuffer();
- gl::Renderbuffer *stencilbuffer = framebuffer->getStencilbuffer();
+ gl::FramebufferAttachment *stencilbuffer = framebuffer->getStencilbuffer();
if (stencilbuffer)
{
@@ -3348,12 +3348,12 @@ void Context::getCurrentReadFormatType(GLenum *internalFormat, GLenum *format, G
Framebuffer *framebuffer = getReadFramebuffer();
ASSERT(framebuffer && framebuffer->completeness() == GL_FRAMEBUFFER_COMPLETE);
- Renderbuffer *renderbuffer = framebuffer->getReadColorbuffer();
- ASSERT(renderbuffer);
+ FramebufferAttachment *attachment = framebuffer->getReadColorbuffer();
+ ASSERT(attachment);
- *internalFormat = renderbuffer->getActualFormat();
- *format = gl::GetFormat(renderbuffer->getActualFormat(), mClientVersion);
- *type = gl::GetType(renderbuffer->getActualFormat(), mClientVersion);
+ *internalFormat = attachment->getActualFormat();
+ *format = gl::GetFormat(attachment->getActualFormat(), mClientVersion);
+ *type = gl::GetType(attachment->getActualFormat(), mClientVersion);
}
void Context::detachBuffer(GLuint buffer)
@@ -3393,7 +3393,7 @@ void Context::detachTexture(GLuint texture)
// [OpenGL ES 2.0.24] section 4.4 page 112:
// If a texture object is deleted while its image is attached to the currently bound framebuffer, then it is
- // as if FramebufferTexture2D had been called, with a texture of 0, for each attachment point to which this
+ // as if Texture2DAttachment had been called, with a texture of 0, for each attachment point to which this
// image was attached in the currently bound framebuffer.
Framebuffer *readFramebuffer = getReadFramebuffer();
@@ -3883,17 +3883,17 @@ size_t Context::getBoundFramebufferTextureSerials(FramebufferTextureSerialArray
Framebuffer *drawFramebuffer = getDrawFramebuffer();
for (unsigned int i = 0; i < IMPLEMENTATION_MAX_DRAW_BUFFERS; i++)
{
- Renderbuffer *renderBuffer = drawFramebuffer->getColorbuffer(i);
- if (renderBuffer && renderBuffer->isTexture())
+ FramebufferAttachment *attachment = drawFramebuffer->getColorbuffer(i);
+ if (attachment && attachment->isTexture())
{
- (*outSerialArray)[serialCount++] = renderBuffer->getTextureSerial();
+ (*outSerialArray)[serialCount++] = attachment->getTextureSerial();
}
}
- Renderbuffer *depthStencilBuffer = drawFramebuffer->getDepthOrStencilbuffer();
- if (depthStencilBuffer && depthStencilBuffer->isTexture())
+ FramebufferAttachment *depthStencilAttachment = drawFramebuffer->getDepthOrStencilbuffer();
+ if (depthStencilAttachment && depthStencilAttachment->isTexture())
{
- (*outSerialArray)[serialCount++] = depthStencilBuffer->getTextureSerial();
+ (*outSerialArray)[serialCount++] = depthStencilAttachment->getTextureSerial();
}
std::sort(outSerialArray->begin(), outSerialArray->begin() + serialCount);
@@ -3958,43 +3958,43 @@ void Context::invalidateFrameBuffer(GLenum target, GLsizei numAttachments, const
if (attachments[i] >= GL_COLOR_ATTACHMENT0 && attachments[i] <= GL_COLOR_ATTACHMENT15)
{
- gl::Renderbuffer *renderBuffer = frameBuffer->getColorbuffer(attachments[i] - GL_COLOR_ATTACHMENT0);
- if (renderBuffer)
+ gl::FramebufferAttachment *attachment = frameBuffer->getColorbuffer(attachments[i] - GL_COLOR_ATTACHMENT0);
+ if (attachment)
{
- renderTarget = renderBuffer->getRenderTarget();
+ renderTarget = attachment->getRenderTarget();
}
}
else if (attachments[i] == GL_COLOR)
{
- gl::Renderbuffer *renderBuffer = frameBuffer->getColorbuffer(0);
- if (renderBuffer)
+ gl::FramebufferAttachment *attachment = frameBuffer->getColorbuffer(0);
+ if (attachment)
{
- renderTarget = renderBuffer->getRenderTarget();
+ renderTarget = attachment->getRenderTarget();
}
}
else
{
- gl::Renderbuffer *renderBuffer = NULL;
+ gl::FramebufferAttachment *attachment = NULL;
switch (attachments[i])
{
case GL_DEPTH_ATTACHMENT:
case GL_DEPTH:
- renderBuffer = frameBuffer->getDepthbuffer();
+ attachment = frameBuffer->getDepthbuffer();
break;
case GL_STENCIL_ATTACHMENT:
case GL_STENCIL:
- renderBuffer = frameBuffer->getStencilbuffer();
+ attachment = frameBuffer->getStencilbuffer();
break;
case GL_DEPTH_STENCIL_ATTACHMENT:
- renderBuffer = frameBuffer->getDepthOrStencilbuffer();
+ attachment = frameBuffer->getDepthOrStencilbuffer();
break;
default:
UNREACHABLE();
}
- if (renderBuffer)
+ if (attachment)
{
- renderTarget = renderBuffer->getDepthStencil();
+ renderTarget = attachment->getDepthStencil();
}
}
diff --git a/src/libGLESv2/Context.h b/src/libGLESv2/Context.h
index b3c8a3fc..ab790042 100644
--- a/src/libGLESv2/Context.h
+++ b/src/libGLESv2/Context.h
@@ -50,7 +50,7 @@ class TextureCubeMap;
class Texture3D;
class Texture2DArray;
class Framebuffer;
-class Renderbuffer;
+class FramebufferAttachment;
class RenderbufferStorage;
class Colorbuffer;
class Depthbuffer;
@@ -100,7 +100,7 @@ struct State
BindingPointer<Buffer> arrayBuffer;
GLuint readFramebuffer;
GLuint drawFramebuffer;
- BindingPointer<Renderbuffer> renderbuffer;
+ BindingPointer<FramebufferAttachment> renderbuffer;
GLuint currentProgram;
VertexAttribCurrentValueData vertexAttribCurrentValues[MAX_VERTEX_ATTRIBS]; // From glVertexAttrib
@@ -331,7 +331,7 @@ class Context
Program *getProgram(GLuint handle) const;
Texture *getTexture(GLuint handle);
Framebuffer *getFramebuffer(GLuint handle) const;
- Renderbuffer *getRenderbuffer(GLuint handle);
+ FramebufferAttachment *getRenderbuffer(GLuint handle);
VertexArray *getVertexArray(GLuint handle) const;
Sampler *getSampler(GLuint handle) const;
Query *getQuery(GLuint handle, bool create, GLenum type);
diff --git a/src/libGLESv2/Framebuffer.cpp b/src/libGLESv2/Framebuffer.cpp
index 97d37d00..b78419fc 100644
--- a/src/libGLESv2/Framebuffer.cpp
+++ b/src/libGLESv2/Framebuffer.cpp
@@ -42,7 +42,7 @@ Framebuffer::~Framebuffer()
mStencilbuffer.set(NULL, GL_NONE, 0, 0);
}
-Renderbuffer *Framebuffer::lookupRenderbuffer(GLenum type, GLuint handle, GLint level, GLint layer) const
+FramebufferAttachment *Framebuffer::lookupAttachment(GLenum type, GLuint handle, GLint level, GLint layer) const
{
gl::Context *context = gl::getContext();
@@ -59,7 +59,7 @@ Renderbuffer *Framebuffer::lookupRenderbuffer(GLenum type, GLuint handle, GLint
Texture *texture = context->getTexture(handle);
if (texture && texture->getTarget() == GL_TEXTURE_2D)
{
- return static_cast<Texture2D*>(texture)->getRenderbuffer(level);
+ return static_cast<Texture2D*>(texture)->getAttachment(level);
}
else
{
@@ -77,7 +77,7 @@ Renderbuffer *Framebuffer::lookupRenderbuffer(GLenum type, GLuint handle, GLint
Texture *texture = context->getTexture(handle);
if (texture && texture->getTarget() == GL_TEXTURE_CUBE_MAP)
{
- return static_cast<TextureCubeMap*>(texture)->getRenderbuffer(type, level);
+ return static_cast<TextureCubeMap*>(texture)->getAttachment(type, level);
}
else
{
@@ -90,7 +90,7 @@ Renderbuffer *Framebuffer::lookupRenderbuffer(GLenum type, GLuint handle, GLint
Texture *texture = context->getTexture(handle);
if (texture && texture->getTarget() == GL_TEXTURE_3D)
{
- return static_cast<Texture3D*>(texture)->getRenderbuffer(level, layer);
+ return static_cast<Texture3D*>(texture)->getAttachment(level, layer);
}
else
{
@@ -103,7 +103,7 @@ Renderbuffer *Framebuffer::lookupRenderbuffer(GLenum type, GLuint handle, GLint
Texture *texture = context->getTexture(handle);
if (texture && texture->getTarget() == GL_TEXTURE_2D_ARRAY)
{
- return static_cast<Texture2DArray*>(texture)->getRenderbuffer(level, layer);
+ return static_cast<Texture2DArray*>(texture)->getAttachment(level, layer);
}
else
{
@@ -120,10 +120,10 @@ Renderbuffer *Framebuffer::lookupRenderbuffer(GLenum type, GLuint handle, GLint
void Framebuffer::setColorbuffer(unsigned int colorAttachment, GLenum type, GLuint colorbuffer, GLint level, GLint layer)
{
ASSERT(colorAttachment < IMPLEMENTATION_MAX_DRAW_BUFFERS);
- Renderbuffer *renderBuffer = lookupRenderbuffer(type, colorbuffer, level, layer);
- if (renderBuffer)
+ FramebufferAttachment *attachment = lookupAttachment(type, colorbuffer, level, layer);
+ if (attachment)
{
- mColorbuffers[colorAttachment].set(renderBuffer, type, level, layer);
+ mColorbuffers[colorAttachment].set(attachment, type, level, layer);
}
else
{
@@ -133,10 +133,10 @@ void Framebuffer::setColorbuffer(unsigned int colorAttachment, GLenum type, GLui
void Framebuffer::setDepthbuffer(GLenum type, GLuint depthbuffer, GLint level, GLint layer)
{
- Renderbuffer *renderBuffer = lookupRenderbuffer(type, depthbuffer, level, layer);
- if (renderBuffer)
+ FramebufferAttachment *attachment = lookupAttachment(type, depthbuffer, level, layer);
+ if (attachment)
{
- mDepthbuffer.set(renderBuffer, type, level, layer);
+ mDepthbuffer.set(attachment, type, level, layer);
}
else
{
@@ -146,10 +146,10 @@ void Framebuffer::setDepthbuffer(GLenum type, GLuint depthbuffer, GLint level, G
void Framebuffer::setStencilbuffer(GLenum type, GLuint stencilbuffer, GLint level, GLint layer)
{
- Renderbuffer *renderBuffer = lookupRenderbuffer(type, stencilbuffer, level, layer);
- if (renderBuffer)
+ FramebufferAttachment *attachment = lookupAttachment(type, stencilbuffer, level, layer);
+ if (attachment)
{
- mStencilbuffer.set(renderBuffer, type, level, layer);
+ mStencilbuffer.set(attachment, type, level, layer);
}
else
{
@@ -159,11 +159,11 @@ void Framebuffer::setStencilbuffer(GLenum type, GLuint stencilbuffer, GLint leve
void Framebuffer::setDepthStencilBuffer(GLenum type, GLuint depthStencilBuffer, GLint level, GLint layer)
{
- Renderbuffer *renderBuffer = lookupRenderbuffer(type, depthStencilBuffer, level, layer);
- if (renderBuffer && renderBuffer->getDepthSize() > 0 && renderBuffer->getStencilSize() > 0)
+ FramebufferAttachment *attachment = lookupAttachment(type, depthStencilBuffer, level, layer);
+ if (attachment && attachment->getDepthSize() > 0 && attachment->getStencilSize() > 0)
{
- mDepthbuffer.set(renderBuffer, type, level, layer);
- mStencilbuffer.set(renderBuffer, type, level, layer);
+ mDepthbuffer.set(attachment, type, level, layer);
+ mStencilbuffer.set(attachment, type, level, layer);
}
else
{
@@ -219,7 +219,7 @@ unsigned int Framebuffer::getRenderTargetSerial(unsigned int colorAttachment) co
{
ASSERT(colorAttachment < IMPLEMENTATION_MAX_DRAW_BUFFERS);
- Renderbuffer *colorbuffer = mColorbuffers[colorAttachment].get();
+ FramebufferAttachment *colorbuffer = mColorbuffers[colorAttachment].get();
if (colorbuffer)
{
@@ -231,7 +231,7 @@ unsigned int Framebuffer::getRenderTargetSerial(unsigned int colorAttachment) co
unsigned int Framebuffer::getDepthbufferSerial() const
{
- Renderbuffer *depthbuffer = mDepthbuffer.get();
+ FramebufferAttachment *depthbuffer = mDepthbuffer.get();
if (depthbuffer)
{
@@ -243,7 +243,7 @@ unsigned int Framebuffer::getDepthbufferSerial() const
unsigned int Framebuffer::getStencilbufferSerial() const
{
- Renderbuffer *stencilbuffer = mStencilbuffer.get();
+ FramebufferAttachment *stencilbuffer = mStencilbuffer.get();
if (stencilbuffer)
{
@@ -253,30 +253,30 @@ unsigned int Framebuffer::getStencilbufferSerial() const
return 0;
}
-Renderbuffer *Framebuffer::getColorbuffer(unsigned int colorAttachment) const
+FramebufferAttachment *Framebuffer::getColorbuffer(unsigned int colorAttachment) const
{
ASSERT(colorAttachment < IMPLEMENTATION_MAX_DRAW_BUFFERS);
return mColorbuffers[colorAttachment].get();
}
-Renderbuffer *Framebuffer::getDepthbuffer() const
+FramebufferAttachment *Framebuffer::getDepthbuffer() const
{
return mDepthbuffer.get();
}
-Renderbuffer *Framebuffer::getStencilbuffer() const
+FramebufferAttachment *Framebuffer::getStencilbuffer() const
{
return mStencilbuffer.get();
}
-Renderbuffer *Framebuffer::getDepthStencilBuffer() const
+FramebufferAttachment *Framebuffer::getDepthStencilBuffer() const
{
return (mDepthbuffer.id() == mStencilbuffer.id()) ? mDepthbuffer.get() : NULL;
}
-Renderbuffer *Framebuffer::getDepthOrStencilbuffer() const
+FramebufferAttachment *Framebuffer::getDepthOrStencilbuffer() const
{
- Renderbuffer *depthstencilbuffer = mDepthbuffer.get();
+ FramebufferAttachment *depthstencilbuffer = mDepthbuffer.get();
if (!depthstencilbuffer)
{
@@ -286,7 +286,7 @@ Renderbuffer *Framebuffer::getDepthOrStencilbuffer() const
return depthstencilbuffer;
}
-Renderbuffer *Framebuffer::getReadColorbuffer() const
+FramebufferAttachment *Framebuffer::getReadColorbuffer() const
{
// Will require more logic if glReadBuffers is supported
return mColorbuffers[0].get();
@@ -298,7 +298,7 @@ GLenum Framebuffer::getReadColorbufferType() const
return mColorbuffers[0].type();
}
-Renderbuffer *Framebuffer::getFirstColorbuffer() const
+FramebufferAttachment *Framebuffer::getFirstColorbuffer() const
{
for (unsigned int colorAttachment = 0; colorAttachment < IMPLEMENTATION_MAX_DRAW_BUFFERS; colorAttachment++)
{
@@ -427,7 +427,7 @@ bool Framebuffer::hasStencil() const
{
if (mStencilbuffer.type() != GL_NONE)
{
- const Renderbuffer *stencilbufferObject = getStencilbuffer();
+ const FramebufferAttachment *stencilbufferObject = getStencilbuffer();
if (stencilbufferObject)
{
@@ -464,7 +464,7 @@ GLenum Framebuffer::completeness() const
{
if (mColorbuffers[colorAttachment].type() != GL_NONE)
{
- const Renderbuffer *colorbuffer = getColorbuffer(colorAttachment);
+ const FramebufferAttachment *colorbuffer = getColorbuffer(colorAttachment);
if (!colorbuffer)
{
@@ -549,8 +549,8 @@ GLenum Framebuffer::completeness() const
}
}
- const Renderbuffer *depthbuffer = NULL;
- const Renderbuffer *stencilbuffer = NULL;
+ const FramebufferAttachment *depthbuffer = NULL;
+ const FramebufferAttachment *stencilbuffer = NULL;
if (mDepthbuffer.type() != GL_NONE)
{
@@ -690,9 +690,9 @@ GLenum Framebuffer::completeness() const
DefaultFramebuffer::DefaultFramebuffer(rx::Renderer *renderer, Colorbuffer *colorbuffer, DepthStencilbuffer *depthStencil)
: Framebuffer(renderer)
{
- mColorbuffers[0].set(new Renderbuffer(mRenderer, 0, colorbuffer), GL_RENDERBUFFER, 0, 0);
+ mColorbuffers[0].set(new FramebufferAttachment(mRenderer, 0, colorbuffer), GL_RENDERBUFFER, 0, 0);
- Renderbuffer *depthStencilRenderbuffer = new Renderbuffer(mRenderer, 0, depthStencil);
+ FramebufferAttachment *depthStencilRenderbuffer = new FramebufferAttachment(mRenderer, 0, depthStencil);
mDepthbuffer.set(depthStencilRenderbuffer, (depthStencilRenderbuffer->getDepthSize() != 0) ? GL_RENDERBUFFER : GL_NONE, 0, 0);
mStencilbuffer.set(depthStencilRenderbuffer, (depthStencilRenderbuffer->getStencilSize() != 0) ? GL_RENDERBUFFER : GL_NONE, 0, 0);
diff --git a/src/libGLESv2/Framebuffer.h b/src/libGLESv2/Framebuffer.h
index c0d8ee88..1a5e2b68 100644
--- a/src/libGLESv2/Framebuffer.h
+++ b/src/libGLESv2/Framebuffer.h
@@ -21,7 +21,7 @@ class Renderer;
namespace gl
{
-class Renderbuffer;
+class FramebufferAttachment;
class Colorbuffer;
class Depthbuffer;
class Stencilbuffer;
@@ -46,14 +46,14 @@ class Framebuffer
unsigned int getDepthbufferSerial() const;
unsigned int getStencilbufferSerial() const;
- Renderbuffer *getColorbuffer(unsigned int colorAttachment) const;
- Renderbuffer *getDepthbuffer() const;
- Renderbuffer *getStencilbuffer() const;
- Renderbuffer *getDepthStencilBuffer() const;
- Renderbuffer *getDepthOrStencilbuffer() const;
- Renderbuffer *getReadColorbuffer() const;
+ FramebufferAttachment *getColorbuffer(unsigned int colorAttachment) const;
+ FramebufferAttachment *getDepthbuffer() const;
+ FramebufferAttachment *getStencilbuffer() const;
+ FramebufferAttachment *getDepthStencilBuffer() const;
+ FramebufferAttachment *getDepthOrStencilbuffer() const;
+ FramebufferAttachment *getReadColorbuffer() const;
GLenum getReadColorbufferType() const;
- Renderbuffer *getFirstColorbuffer() const;
+ FramebufferAttachment *getFirstColorbuffer() const;
GLenum getColorbufferType(unsigned int colorAttachment) const;
GLenum getDepthbufferType() const;
@@ -87,19 +87,19 @@ class Framebuffer
virtual GLenum completeness() const;
protected:
- FramebufferTextureBindingPointer<Renderbuffer> mColorbuffers[IMPLEMENTATION_MAX_DRAW_BUFFERS];
+ FramebufferTextureBindingPointer<FramebufferAttachment> mColorbuffers[IMPLEMENTATION_MAX_DRAW_BUFFERS];
GLenum mDrawBufferStates[IMPLEMENTATION_MAX_DRAW_BUFFERS];
GLenum mReadBufferState;
- FramebufferTextureBindingPointer<Renderbuffer> mDepthbuffer;
- FramebufferTextureBindingPointer<Renderbuffer> mStencilbuffer;
+ FramebufferTextureBindingPointer<FramebufferAttachment> mDepthbuffer;
+ FramebufferTextureBindingPointer<FramebufferAttachment> mStencilbuffer;
rx::Renderer *mRenderer;
private:
DISALLOW_COPY_AND_ASSIGN(Framebuffer);
- Renderbuffer *lookupRenderbuffer(GLenum type, GLuint handle, GLint level, GLint layer) const;
+ FramebufferAttachment *lookupAttachment(GLenum type, GLuint handle, GLint level, GLint layer) const;
};
class DefaultFramebuffer : public Framebuffer
diff --git a/src/libGLESv2/FramebufferAttachment.cpp b/src/libGLESv2/FramebufferAttachment.cpp
new file mode 100644
index 00000000..574ce7ee
--- /dev/null
+++ b/src/libGLESv2/FramebufferAttachment.cpp
@@ -0,0 +1,491 @@
+#include "precompiled.h"
+//
+// Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+// FramebufferAttachment.cpp: the gl::FramebufferAttachment class and its derived classes
+// objects and related functionality. [OpenGL ES 2.0.24] section 4.4.3 page 108.
+
+#include "libGLESv2/FramebufferAttachment.h"
+#include "libGLESv2/renderer/RenderTarget.h"
+
+#include "libGLESv2/Texture.h"
+#include "libGLESv2/renderer/Renderer.h"
+#include "libGLESv2/renderer/TextureStorage.h"
+#include "common/utilities.h"
+#include "libGLESv2/formatutils.h"
+#include "libGLESv2/Renderbuffer.h"
+
+namespace gl
+{
+
+FramebufferAttachmentInterface::FramebufferAttachmentInterface()
+{
+}
+
+// The default case for classes inherited from FramebufferAttachmentInterface is not to
+// need to do anything upon the reference count to the parent FramebufferAttachment incrementing
+// or decrementing.
+void FramebufferAttachmentInterface::addProxyRef(const FramebufferAttachment *proxy)
+{
+}
+
+void FramebufferAttachmentInterface::releaseProxy(const FramebufferAttachment *proxy)
+{
+}
+
+///// Texture2DAttachment Implementation ////////
+
+Texture2DAttachment::Texture2DAttachment(Texture2D *texture, GLint level) : mLevel(level)
+{
+ mTexture2D.set(texture);
+}
+
+Texture2DAttachment::~Texture2DAttachment()
+{
+ mTexture2D.set(NULL);
+}
+
+// Textures need to maintain their own reference count for references via
+// Renderbuffers acting as proxies. Here, we notify the texture of a reference.
+void Texture2DAttachment::addProxyRef(const FramebufferAttachment *proxy)
+{
+ mTexture2D->addProxyRef(proxy);
+}
+
+void Texture2DAttachment::releaseProxy(const FramebufferAttachment *proxy)
+{
+ mTexture2D->releaseProxy(proxy);
+}
+
+rx::RenderTarget *Texture2DAttachment::getRenderTarget()
+{
+ return mTexture2D->getRenderTarget(mLevel);
+}
+
+rx::RenderTarget *Texture2DAttachment::getDepthStencil()
+{
+ return mTexture2D->getDepthSencil(mLevel);
+}
+
+rx::TextureStorage *Texture2DAttachment::getTextureStorage()
+{
+ return mTexture2D->getNativeTexture()->getStorageInstance();
+}
+
+GLsizei Texture2DAttachment::getWidth() const
+{
+ return mTexture2D->getWidth(mLevel);
+}
+
+GLsizei Texture2DAttachment::getHeight() const
+{
+ return mTexture2D->getHeight(mLevel);
+}
+
+GLenum Texture2DAttachment::getInternalFormat() const
+{
+ return mTexture2D->getInternalFormat(mLevel);
+}
+
+GLenum Texture2DAttachment::getActualFormat() const
+{
+ return mTexture2D->getActualFormat(mLevel);
+}
+
+GLsizei Texture2DAttachment::getSamples() const
+{
+ return 0;
+}
+
+unsigned int Texture2DAttachment::getSerial() const
+{
+ return mTexture2D->getRenderTargetSerial(mLevel);
+}
+
+bool Texture2DAttachment::isTexture() const
+{
+ return true;
+}
+
+unsigned int Texture2DAttachment::getTextureSerial() const
+{
+ return mTexture2D->getTextureSerial();
+}
+
+///// TextureCubeMapAttachment Implementation ////////
+
+TextureCubeMapAttachment::TextureCubeMapAttachment(TextureCubeMap *texture, GLenum faceTarget, GLint level)
+ : mFaceTarget(faceTarget), mLevel(level)
+{
+ mTextureCubeMap.set(texture);
+}
+
+TextureCubeMapAttachment::~TextureCubeMapAttachment()
+{
+ mTextureCubeMap.set(NULL);
+}
+
+// Textures need to maintain their own reference count for references via
+// Renderbuffers acting as proxies. Here, we notify the texture of a reference.
+void TextureCubeMapAttachment::addProxyRef(const FramebufferAttachment *proxy)
+{
+ mTextureCubeMap->addProxyRef(proxy);
+}
+
+void TextureCubeMapAttachment::releaseProxy(const FramebufferAttachment *proxy)
+{
+ mTextureCubeMap->releaseProxy(proxy);
+}
+
+rx::RenderTarget *TextureCubeMapAttachment::getRenderTarget()
+{
+ return mTextureCubeMap->getRenderTarget(mFaceTarget, mLevel);
+}
+
+rx::RenderTarget *TextureCubeMapAttachment::getDepthStencil()
+{
+ return mTextureCubeMap->getDepthStencil(mFaceTarget, mLevel);
+}
+
+rx::TextureStorage *TextureCubeMapAttachment::getTextureStorage()
+{
+ return mTextureCubeMap->getNativeTexture()->getStorageInstance();
+}
+
+GLsizei TextureCubeMapAttachment::getWidth() const
+{
+ return mTextureCubeMap->getWidth(mFaceTarget, mLevel);
+}
+
+GLsizei TextureCubeMapAttachment::getHeight() const
+{
+ return mTextureCubeMap->getHeight(mFaceTarget, mLevel);
+}
+
+GLenum TextureCubeMapAttachment::getInternalFormat() const
+{
+ return mTextureCubeMap->getInternalFormat(mFaceTarget, mLevel);
+}
+
+GLenum TextureCubeMapAttachment::getActualFormat() const
+{
+ return mTextureCubeMap->getActualFormat(mFaceTarget, mLevel);
+}
+
+GLsizei TextureCubeMapAttachment::getSamples() const
+{
+ return 0;
+}
+
+unsigned int TextureCubeMapAttachment::getSerial() const
+{
+ return mTextureCubeMap->getRenderTargetSerial(mFaceTarget, mLevel);
+}
+
+bool TextureCubeMapAttachment::isTexture() const
+{
+ return true;
+}
+
+unsigned int TextureCubeMapAttachment::getTextureSerial() const
+{
+ return mTextureCubeMap->getTextureSerial();
+}
+
+///// Texture3DAttachment Implementation ////////
+
+Texture3DAttachment::Texture3DAttachment(Texture3D *texture, GLint level, GLint layer)
+ : mLevel(level), mLayer(layer)
+{
+ mTexture3D.set(texture);
+}
+
+Texture3DAttachment::~Texture3DAttachment()
+{
+ mTexture3D.set(NULL);
+}
+
+// Textures need to maintain their own reference count for references via
+// Renderbuffers acting as proxies. Here, we notify the texture of a reference.
+void Texture3DAttachment::addProxyRef(const FramebufferAttachment *proxy)
+{
+ mTexture3D->addProxyRef(proxy);
+}
+
+void Texture3DAttachment::releaseProxy(const FramebufferAttachment *proxy)
+{
+ mTexture3D->releaseProxy(proxy);
+}
+
+rx::RenderTarget *Texture3DAttachment::getRenderTarget()
+{
+ return mTexture3D->getRenderTarget(mLevel, mLayer);
+}
+
+rx::RenderTarget *Texture3DAttachment::getDepthStencil()
+{
+ return mTexture3D->getDepthStencil(mLevel, mLayer);
+}
+
+rx::TextureStorage *Texture3DAttachment::getTextureStorage()
+{
+ return mTexture3D->getNativeTexture()->getStorageInstance();
+}
+
+GLsizei Texture3DAttachment::getWidth() const
+{
+ return mTexture3D->getWidth(mLevel);
+}
+
+GLsizei Texture3DAttachment::getHeight() const
+{
+ return mTexture3D->getHeight(mLevel);
+}
+
+GLenum Texture3DAttachment::getInternalFormat() const
+{
+ return mTexture3D->getInternalFormat(mLevel);
+}
+
+GLenum Texture3DAttachment::getActualFormat() const
+{
+ return mTexture3D->getActualFormat(mLevel);
+}
+
+GLsizei Texture3DAttachment::getSamples() const
+{
+ return 0;
+}
+
+unsigned int Texture3DAttachment::getSerial() const
+{
+ return mTexture3D->getRenderTargetSerial(mLevel, mLayer);
+}
+
+bool Texture3DAttachment::isTexture() const
+{
+ return true;
+}
+
+unsigned int Texture3DAttachment::getTextureSerial() const
+{
+ return mTexture3D->getTextureSerial();
+}
+
+////// Texture2DArrayAttachment Implementation //////
+
+Texture2DArrayAttachment::Texture2DArrayAttachment(Texture2DArray *texture, GLint level, GLint layer)
+ : mLevel(level), mLayer(layer)
+{
+ mTexture2DArray.set(texture);
+}
+
+Texture2DArrayAttachment::~Texture2DArrayAttachment()
+{
+ mTexture2DArray.set(NULL);
+}
+
+void Texture2DArrayAttachment::addProxyRef(const FramebufferAttachment *proxy)
+{
+ mTexture2DArray->addProxyRef(proxy);
+}
+
+void Texture2DArrayAttachment::releaseProxy(const FramebufferAttachment *proxy)
+{
+ mTexture2DArray->releaseProxy(proxy);
+}
+
+rx::RenderTarget *Texture2DArrayAttachment::getRenderTarget()
+{
+ return mTexture2DArray->getRenderTarget(mLevel, mLayer);
+}
+
+rx::RenderTarget *Texture2DArrayAttachment::getDepthStencil()
+{
+ return mTexture2DArray->getDepthStencil(mLevel, mLayer);
+}
+
+rx::TextureStorage *Texture2DArrayAttachment::getTextureStorage()
+{
+ return mTexture2DArray->getNativeTexture()->getStorageInstance();
+}
+
+GLsizei Texture2DArrayAttachment::getWidth() const
+{
+ return mTexture2DArray->getWidth(mLevel);
+}
+
+GLsizei Texture2DArrayAttachment::getHeight() const
+{
+ return mTexture2DArray->getHeight(mLevel);
+}
+
+GLenum Texture2DArrayAttachment::getInternalFormat() const
+{
+ return mTexture2DArray->getInternalFormat(mLevel);
+}
+
+GLenum Texture2DArrayAttachment::getActualFormat() const
+{
+ return mTexture2DArray->getActualFormat(mLevel);
+}
+
+GLsizei Texture2DArrayAttachment::getSamples() const
+{
+ return 0;
+}
+
+unsigned int Texture2DArrayAttachment::getSerial() const
+{
+ return mTexture2DArray->getRenderTargetSerial(mLevel, mLayer);
+}
+
+bool Texture2DArrayAttachment::isTexture() const
+{
+ return true;
+}
+
+unsigned int Texture2DArrayAttachment::getTextureSerial() const
+{
+ return mTexture2DArray->getTextureSerial();
+}
+
+////// FramebufferAttachment Implementation //////
+
+FramebufferAttachment::FramebufferAttachment(rx::Renderer *renderer, GLuint id, FramebufferAttachmentInterface *instance) : RefCountObject(id)
+{
+ ASSERT(instance != NULL);
+ mInstance = instance;
+
+ ASSERT(renderer != NULL);
+ mRenderer = renderer;
+}
+
+FramebufferAttachment::~FramebufferAttachment()
+{
+ delete mInstance;
+}
+
+// The FramebufferAttachmentInterface contained in this FramebufferAttachment may need to maintain
+// its own reference count, so we pass it on here.
+void FramebufferAttachment::addRef() const
+{
+ mInstance->addProxyRef(this);
+
+ RefCountObject::addRef();
+}
+
+void FramebufferAttachment::release() const
+{
+ mInstance->releaseProxy(this);
+
+ RefCountObject::release();
+}
+
+rx::RenderTarget *FramebufferAttachment::getRenderTarget()
+{
+ return mInstance->getRenderTarget();
+}
+
+rx::RenderTarget *FramebufferAttachment::getDepthStencil()
+{
+ return mInstance->getDepthStencil();
+}
+
+rx::TextureStorage *FramebufferAttachment::getTextureStorage()
+{
+ return mInstance->getTextureStorage();
+}
+
+GLsizei FramebufferAttachment::getWidth() const
+{
+ return mInstance->getWidth();
+}
+
+GLsizei FramebufferAttachment::getHeight() const
+{
+ return mInstance->getHeight();
+}
+
+GLenum FramebufferAttachment::getInternalFormat() const
+{
+ return mInstance->getInternalFormat();
+}
+
+GLenum FramebufferAttachment::getActualFormat() const
+{
+ return mInstance->getActualFormat();
+}
+
+GLuint FramebufferAttachment::getRedSize() const
+{
+ return gl::GetRedBits(getActualFormat(), mRenderer->getCurrentClientVersion());
+}
+
+GLuint FramebufferAttachment::getGreenSize() const
+{
+ return gl::GetGreenBits(getActualFormat(), mRenderer->getCurrentClientVersion());
+}
+
+GLuint FramebufferAttachment::getBlueSize() const
+{
+ return gl::GetBlueBits(getActualFormat(), mRenderer->getCurrentClientVersion());
+}
+
+GLuint FramebufferAttachment::getAlphaSize() const
+{
+ return gl::GetAlphaBits(getActualFormat(), mRenderer->getCurrentClientVersion());
+}
+
+GLuint FramebufferAttachment::getDepthSize() const
+{
+ return gl::GetDepthBits(getActualFormat(), mRenderer->getCurrentClientVersion());
+}
+
+GLuint FramebufferAttachment::getStencilSize() const
+{
+ return gl::GetStencilBits(getActualFormat(), mRenderer->getCurrentClientVersion());
+}
+
+GLenum FramebufferAttachment::getComponentType() const
+{
+ return gl::GetComponentType(getActualFormat(), mRenderer->getCurrentClientVersion());
+}
+
+GLenum FramebufferAttachment::getColorEncoding() const
+{
+ return gl::GetColorEncoding(getActualFormat(), mRenderer->getCurrentClientVersion());
+}
+
+GLsizei FramebufferAttachment::getSamples() const
+{
+ return mInstance->getSamples();
+}
+
+unsigned int FramebufferAttachment::getSerial() const
+{
+ return mInstance->getSerial();
+}
+
+bool FramebufferAttachment::isTexture() const
+{
+ return mInstance->isTexture();
+}
+
+unsigned int FramebufferAttachment::getTextureSerial() const
+{
+ return mInstance->getTextureSerial();
+}
+
+void FramebufferAttachment::setStorage(RenderbufferStorage *newStorage)
+{
+ ASSERT(newStorage != NULL);
+
+ delete mInstance;
+ mInstance = newStorage;
+}
+
+}
diff --git a/src/libGLESv2/FramebufferAttachment.h b/src/libGLESv2/FramebufferAttachment.h
new file mode 100644
index 00000000..9ba63cc3
--- /dev/null
+++ b/src/libGLESv2/FramebufferAttachment.h
@@ -0,0 +1,247 @@
+//
+// Copyright (c) 2014 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+// FramebufferAttachment.h: Defines the wrapper class gl::FramebufferAttachment, as well as the
+// objects and related functionality. [OpenGL ES 2.0.24] section 4.4.3 page 108.
+
+#ifndef LIBGLESV2_FRAMEBUFFERATTACHMENT_H_
+#define LIBGLESV2_FRAMEBUFFERATTACHMENT_H_
+
+#include <GLES3/gl3.h>
+#include <GLES2/gl2.h>
+
+#include "common/angleutils.h"
+#include "common/RefCountObject.h"
+
+namespace rx
+{
+class Renderer;
+class RenderTarget;
+class TextureStorage;
+}
+
+namespace gl
+{
+class Texture2D;
+class TextureCubeMap;
+class Texture3D;
+class Texture2DArray;
+class FramebufferAttachment;
+class FramebufferAttachmentInterface;
+class RenderbufferStorage;
+
+// FramebufferAttachment implements the GL renderbuffer object.
+// It's only a proxy for a FramebufferAttachmentInterface instance; the internal object
+// can change whenever glRenderbufferStorage is called.
+class FramebufferAttachment : public RefCountObject
+{
+ public:
+ FramebufferAttachment(rx::Renderer *renderer, GLuint id, FramebufferAttachmentInterface *storage);
+
+ virtual ~FramebufferAttachment();
+
+ // These functions from RefCountObject are overloaded here because
+ // Textures need to maintain their own count of references to them via
+ // Renderbuffers/RenderbufferTextures. These functions invoke those
+ // reference counting functions on the FramebufferAttachmentInterface.
+ void addRef() const;
+ void release() const;
+
+ rx::RenderTarget *getRenderTarget();
+ rx::RenderTarget *getDepthStencil();
+ rx::TextureStorage *getTextureStorage();
+
+ GLsizei getWidth() const;
+ GLsizei getHeight() const;
+ GLenum getInternalFormat() const;
+ GLenum getActualFormat() const;
+ GLuint getRedSize() const;
+ GLuint getGreenSize() const;
+ GLuint getBlueSize() const;
+ GLuint getAlphaSize() const;
+ GLuint getDepthSize() const;
+ GLuint getStencilSize() const;
+ GLenum getComponentType() const;
+ GLenum getColorEncoding() const;
+ GLsizei getSamples() const;
+
+ unsigned int getSerial() const;
+
+ bool isTexture() const;
+ unsigned int getTextureSerial() const;
+
+ void setStorage(RenderbufferStorage *newStorage);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(FramebufferAttachment);
+
+ rx::Renderer const *mRenderer;
+ FramebufferAttachmentInterface *mInstance;
+};
+
+class FramebufferAttachmentInterface
+{
+ public:
+ FramebufferAttachmentInterface();
+
+ virtual ~FramebufferAttachmentInterface() {};
+
+ virtual void addProxyRef(const FramebufferAttachment *proxy);
+ virtual void releaseProxy(const FramebufferAttachment *proxy);
+
+ virtual rx::RenderTarget *getRenderTarget() = 0;
+ virtual rx::RenderTarget *getDepthStencil() = 0;
+ virtual rx::TextureStorage *getTextureStorage() = 0;
+
+ virtual GLsizei getWidth() const = 0;
+ virtual GLsizei getHeight() const = 0;
+ virtual GLenum getInternalFormat() const = 0;
+ virtual GLenum getActualFormat() const = 0;
+ virtual GLsizei getSamples() const = 0;
+
+ virtual unsigned int getSerial() const = 0;
+
+ virtual bool isTexture() const = 0;
+ virtual unsigned int getTextureSerial() const = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(FramebufferAttachmentInterface);
+};
+
+class Texture2DAttachment : public FramebufferAttachmentInterface
+{
+ public:
+ Texture2DAttachment(Texture2D *texture, GLint level);
+
+ virtual ~Texture2DAttachment();
+
+ void addProxyRef(const FramebufferAttachment *proxy);
+ void releaseProxy(const FramebufferAttachment *proxy);
+
+ rx::RenderTarget *getRenderTarget();
+ rx::RenderTarget *getDepthStencil();
+ rx::TextureStorage *getTextureStorage();
+
+ virtual GLsizei getWidth() const;
+ virtual GLsizei getHeight() const;
+ virtual GLenum getInternalFormat() const;
+ virtual GLenum getActualFormat() const;
+ virtual GLsizei getSamples() const;
+
+ virtual unsigned int getSerial() const;
+
+ virtual bool isTexture() const;
+ virtual unsigned int getTextureSerial() const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Texture2DAttachment);
+
+ BindingPointer <Texture2D> mTexture2D;
+ const GLint mLevel;
+};
+
+class TextureCubeMapAttachment : public FramebufferAttachmentInterface
+{
+ public:
+ TextureCubeMapAttachment(TextureCubeMap *texture, GLenum faceTarget, GLint level);
+
+ virtual ~TextureCubeMapAttachment();
+
+ void addProxyRef(const FramebufferAttachment *proxy);
+ void releaseProxy(const FramebufferAttachment *proxy);
+
+ rx::RenderTarget *getRenderTarget();
+ rx::RenderTarget *getDepthStencil();
+ rx::TextureStorage *getTextureStorage();
+
+ virtual GLsizei getWidth() const;
+ virtual GLsizei getHeight() const;
+ virtual GLenum getInternalFormat() const;
+ virtual GLenum getActualFormat() const;
+ virtual GLsizei getSamples() const;
+
+ virtual unsigned int getSerial() const;
+
+ virtual bool isTexture() const;
+ virtual unsigned int getTextureSerial() const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(TextureCubeMapAttachment);
+
+ BindingPointer <TextureCubeMap> mTextureCubeMap;
+ const GLint mLevel;
+ const GLenum mFaceTarget;
+};
+
+class Texture3DAttachment : public FramebufferAttachmentInterface
+{
+ public:
+ Texture3DAttachment(Texture3D *texture, GLint level, GLint layer);
+
+ virtual ~Texture3DAttachment();
+
+ void addProxyRef(const FramebufferAttachment *proxy);
+ void releaseProxy(const FramebufferAttachment *proxy);
+
+ rx::RenderTarget *getRenderTarget();
+ rx::RenderTarget *getDepthStencil();
+ rx::TextureStorage *getTextureStorage();
+
+ virtual GLsizei getWidth() const;
+ virtual GLsizei getHeight() const;
+ virtual GLenum getInternalFormat() const;
+ virtual GLenum getActualFormat() const;
+ virtual GLsizei getSamples() const;
+
+ virtual unsigned int getSerial() const;
+
+ virtual bool isTexture() const;
+ virtual unsigned int getTextureSerial() const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Texture3DAttachment);
+
+ BindingPointer<Texture3D> mTexture3D;
+ const GLint mLevel;
+ const GLint mLayer;
+};
+
+class Texture2DArrayAttachment : public FramebufferAttachmentInterface
+{
+ public:
+ Texture2DArrayAttachment(Texture2DArray *texture, GLint level, GLint layer);
+
+ virtual ~Texture2DArrayAttachment();
+
+ void addProxyRef(const FramebufferAttachment *proxy);
+ void releaseProxy(const FramebufferAttachment *proxy);
+
+ rx::RenderTarget *getRenderTarget();
+ rx::RenderTarget *getDepthStencil();
+ rx::TextureStorage *getTextureStorage();
+
+ virtual GLsizei getWidth() const;
+ virtual GLsizei getHeight() const;
+ virtual GLenum getInternalFormat() const;
+ virtual GLenum getActualFormat() const;
+ virtual GLsizei getSamples() const;
+
+ virtual unsigned int getSerial() const;
+
+ virtual bool isTexture() const;
+ virtual unsigned int getTextureSerial() const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Texture2DArrayAttachment);
+
+ BindingPointer<Texture2DArray> mTexture2DArray;
+ const GLint mLevel;
+ const GLint mLayer;
+};
+
+}
+
+#endif // LIBGLESV2_FRAMEBUFFERATTACHMENT_H_
diff --git a/src/libGLESv2/Renderbuffer.cpp b/src/libGLESv2/Renderbuffer.cpp
index 28519087..dade014b 100644
--- a/src/libGLESv2/Renderbuffer.cpp
+++ b/src/libGLESv2/Renderbuffer.cpp
@@ -22,473 +22,6 @@ namespace gl
{
unsigned int RenderbufferStorage::mCurrentSerial = 1;
-RenderbufferInterface::RenderbufferInterface()
-{
-}
-
-// The default case for classes inherited from RenderbufferInterface is not to
-// need to do anything upon the reference count to the parent Renderbuffer incrementing
-// or decrementing.
-void RenderbufferInterface::addProxyRef(const Renderbuffer *proxy)
-{
-}
-
-void RenderbufferInterface::releaseProxy(const Renderbuffer *proxy)
-{
-}
-
-///// RenderbufferTexture2D Implementation ////////
-
-RenderbufferTexture2D::RenderbufferTexture2D(Texture2D *texture, GLint level) : mLevel(level)
-{
- mTexture2D.set(texture);
-}
-
-RenderbufferTexture2D::~RenderbufferTexture2D()
-{
- mTexture2D.set(NULL);
-}
-
-// Textures need to maintain their own reference count for references via
-// Renderbuffers acting as proxies. Here, we notify the texture of a reference.
-void RenderbufferTexture2D::addProxyRef(const Renderbuffer *proxy)
-{
- mTexture2D->addProxyRef(proxy);
-}
-
-void RenderbufferTexture2D::releaseProxy(const Renderbuffer *proxy)
-{
- mTexture2D->releaseProxy(proxy);
-}
-
-rx::RenderTarget *RenderbufferTexture2D::getRenderTarget()
-{
- return mTexture2D->getRenderTarget(mLevel);
-}
-
-rx::RenderTarget *RenderbufferTexture2D::getDepthStencil()
-{
- return mTexture2D->getDepthSencil(mLevel);
-}
-
-rx::TextureStorage *RenderbufferTexture2D::getTextureStorage()
-{
- return mTexture2D->getNativeTexture()->getStorageInstance();
-}
-
-GLsizei RenderbufferTexture2D::getWidth() const
-{
- return mTexture2D->getWidth(mLevel);
-}
-
-GLsizei RenderbufferTexture2D::getHeight() const
-{
- return mTexture2D->getHeight(mLevel);
-}
-
-GLenum RenderbufferTexture2D::getInternalFormat() const
-{
- return mTexture2D->getInternalFormat(mLevel);
-}
-
-GLenum RenderbufferTexture2D::getActualFormat() const
-{
- return mTexture2D->getActualFormat(mLevel);
-}
-
-GLsizei RenderbufferTexture2D::getSamples() const
-{
- return 0;
-}
-
-unsigned int RenderbufferTexture2D::getSerial() const
-{
- return mTexture2D->getRenderTargetSerial(mLevel);
-}
-
-bool RenderbufferTexture2D::isTexture() const
-{
- return true;
-}
-
-unsigned int RenderbufferTexture2D::getTextureSerial() const
-{
- return mTexture2D->getTextureSerial();
-}
-
-///// RenderbufferTextureCubeMap Implementation ////////
-
-RenderbufferTextureCubeMap::RenderbufferTextureCubeMap(TextureCubeMap *texture, GLenum faceTarget, GLint level)
- : mFaceTarget(faceTarget), mLevel(level)
-{
- mTextureCubeMap.set(texture);
-}
-
-RenderbufferTextureCubeMap::~RenderbufferTextureCubeMap()
-{
- mTextureCubeMap.set(NULL);
-}
-
-// Textures need to maintain their own reference count for references via
-// Renderbuffers acting as proxies. Here, we notify the texture of a reference.
-void RenderbufferTextureCubeMap::addProxyRef(const Renderbuffer *proxy)
-{
- mTextureCubeMap->addProxyRef(proxy);
-}
-
-void RenderbufferTextureCubeMap::releaseProxy(const Renderbuffer *proxy)
-{
- mTextureCubeMap->releaseProxy(proxy);
-}
-
-rx::RenderTarget *RenderbufferTextureCubeMap::getRenderTarget()
-{
- return mTextureCubeMap->getRenderTarget(mFaceTarget, mLevel);
-}
-
-rx::RenderTarget *RenderbufferTextureCubeMap::getDepthStencil()
-{
- return mTextureCubeMap->getDepthStencil(mFaceTarget, mLevel);
-}
-
-rx::TextureStorage *RenderbufferTextureCubeMap::getTextureStorage()
-{
- return mTextureCubeMap->getNativeTexture()->getStorageInstance();
-}
-
-GLsizei RenderbufferTextureCubeMap::getWidth() const
-{
- return mTextureCubeMap->getWidth(mFaceTarget, mLevel);
-}
-
-GLsizei RenderbufferTextureCubeMap::getHeight() const
-{
- return mTextureCubeMap->getHeight(mFaceTarget, mLevel);
-}
-
-GLenum RenderbufferTextureCubeMap::getInternalFormat() const
-{
- return mTextureCubeMap->getInternalFormat(mFaceTarget, mLevel);
-}
-
-GLenum RenderbufferTextureCubeMap::getActualFormat() const
-{
- return mTextureCubeMap->getActualFormat(mFaceTarget, mLevel);
-}
-
-GLsizei RenderbufferTextureCubeMap::getSamples() const
-{
- return 0;
-}
-
-unsigned int RenderbufferTextureCubeMap::getSerial() const
-{
- return mTextureCubeMap->getRenderTargetSerial(mFaceTarget, mLevel);
-}
-
-bool RenderbufferTextureCubeMap::isTexture() const
-{
- return true;
-}
-
-unsigned int RenderbufferTextureCubeMap::getTextureSerial() const
-{
- return mTextureCubeMap->getTextureSerial();
-}
-
-///// RenderbufferTexture3DLayer Implementation ////////
-
-RenderbufferTexture3DLayer::RenderbufferTexture3DLayer(Texture3D *texture, GLint level, GLint layer)
- : mLevel(level), mLayer(layer)
-{
- mTexture3D.set(texture);
-}
-
-RenderbufferTexture3DLayer::~RenderbufferTexture3DLayer()
-{
- mTexture3D.set(NULL);
-}
-
-// Textures need to maintain their own reference count for references via
-// Renderbuffers acting as proxies. Here, we notify the texture of a reference.
-void RenderbufferTexture3DLayer::addProxyRef(const Renderbuffer *proxy)
-{
- mTexture3D->addProxyRef(proxy);
-}
-
-void RenderbufferTexture3DLayer::releaseProxy(const Renderbuffer *proxy)
-{
- mTexture3D->releaseProxy(proxy);
-}
-
-rx::RenderTarget *RenderbufferTexture3DLayer::getRenderTarget()
-{
- return mTexture3D->getRenderTarget(mLevel, mLayer);
-}
-
-rx::RenderTarget *RenderbufferTexture3DLayer::getDepthStencil()
-{
- return mTexture3D->getDepthStencil(mLevel, mLayer);
-}
-
-rx::TextureStorage *RenderbufferTexture3DLayer::getTextureStorage()
-{
- return mTexture3D->getNativeTexture()->getStorageInstance();
-}
-
-GLsizei RenderbufferTexture3DLayer::getWidth() const
-{
- return mTexture3D->getWidth(mLevel);
-}
-
-GLsizei RenderbufferTexture3DLayer::getHeight() const
-{
- return mTexture3D->getHeight(mLevel);
-}
-
-GLenum RenderbufferTexture3DLayer::getInternalFormat() const
-{
- return mTexture3D->getInternalFormat(mLevel);
-}
-
-GLenum RenderbufferTexture3DLayer::getActualFormat() const
-{
- return mTexture3D->getActualFormat(mLevel);
-}
-
-GLsizei RenderbufferTexture3DLayer::getSamples() const
-{
- return 0;
-}
-
-unsigned int RenderbufferTexture3DLayer::getSerial() const
-{
- return mTexture3D->getRenderTargetSerial(mLevel, mLayer);
-}
-
-bool RenderbufferTexture3DLayer::isTexture() const
-{
- return true;
-}
-
-unsigned int RenderbufferTexture3DLayer::getTextureSerial() const
-{
- return mTexture3D->getTextureSerial();
-}
-
-////// RenderbufferTexture2DArrayLayer Implementation //////
-
-RenderbufferTexture2DArrayLayer::RenderbufferTexture2DArrayLayer(Texture2DArray *texture, GLint level, GLint layer)
- : mLevel(level), mLayer(layer)
-{
- mTexture2DArray.set(texture);
-}
-
-RenderbufferTexture2DArrayLayer::~RenderbufferTexture2DArrayLayer()
-{
- mTexture2DArray.set(NULL);
-}
-
-void RenderbufferTexture2DArrayLayer::addProxyRef(const Renderbuffer *proxy)
-{
- mTexture2DArray->addProxyRef(proxy);
-}
-
-void RenderbufferTexture2DArrayLayer::releaseProxy(const Renderbuffer *proxy)
-{
- mTexture2DArray->releaseProxy(proxy);
-}
-
-rx::RenderTarget *RenderbufferTexture2DArrayLayer::getRenderTarget()
-{
- return mTexture2DArray->getRenderTarget(mLevel, mLayer);
-}
-
-rx::RenderTarget *RenderbufferTexture2DArrayLayer::getDepthStencil()
-{
- return mTexture2DArray->getDepthStencil(mLevel, mLayer);
-}
-
-rx::TextureStorage *RenderbufferTexture2DArrayLayer::getTextureStorage()
-{
- return mTexture2DArray->getNativeTexture()->getStorageInstance();
-}
-
-GLsizei RenderbufferTexture2DArrayLayer::getWidth() const
-{
- return mTexture2DArray->getWidth(mLevel);
-}
-
-GLsizei RenderbufferTexture2DArrayLayer::getHeight() const
-{
- return mTexture2DArray->getHeight(mLevel);
-}
-
-GLenum RenderbufferTexture2DArrayLayer::getInternalFormat() const
-{
- return mTexture2DArray->getInternalFormat(mLevel);
-}
-
-GLenum RenderbufferTexture2DArrayLayer::getActualFormat() const
-{
- return mTexture2DArray->getActualFormat(mLevel);
-}
-
-GLsizei RenderbufferTexture2DArrayLayer::getSamples() const
-{
- return 0;
-}
-
-unsigned int RenderbufferTexture2DArrayLayer::getSerial() const
-{
- return mTexture2DArray->getRenderTargetSerial(mLevel, mLayer);
-}
-
-bool RenderbufferTexture2DArrayLayer::isTexture() const
-{
- return true;
-}
-
-unsigned int RenderbufferTexture2DArrayLayer::getTextureSerial() const
-{
- return mTexture2DArray->getTextureSerial();
-}
-
-////// Renderbuffer Implementation //////
-
-Renderbuffer::Renderbuffer(rx::Renderer *renderer, GLuint id, RenderbufferInterface *instance) : RefCountObject(id)
-{
- ASSERT(instance != NULL);
- mInstance = instance;
-
- ASSERT(renderer != NULL);
- mRenderer = renderer;
-}
-
-Renderbuffer::~Renderbuffer()
-{
- delete mInstance;
-}
-
-// The RenderbufferInterface contained in this Renderbuffer may need to maintain
-// its own reference count, so we pass it on here.
-void Renderbuffer::addRef() const
-{
- mInstance->addProxyRef(this);
-
- RefCountObject::addRef();
-}
-
-void Renderbuffer::release() const
-{
- mInstance->releaseProxy(this);
-
- RefCountObject::release();
-}
-
-rx::RenderTarget *Renderbuffer::getRenderTarget()
-{
- return mInstance->getRenderTarget();
-}
-
-rx::RenderTarget *Renderbuffer::getDepthStencil()
-{
- return mInstance->getDepthStencil();
-}
-
-rx::TextureStorage *Renderbuffer::getTextureStorage()
-{
- return mInstance->getTextureStorage();
-}
-
-GLsizei Renderbuffer::getWidth() const
-{
- return mInstance->getWidth();
-}
-
-GLsizei Renderbuffer::getHeight() const
-{
- return mInstance->getHeight();
-}
-
-GLenum Renderbuffer::getInternalFormat() const
-{
- return mInstance->getInternalFormat();
-}
-
-GLenum Renderbuffer::getActualFormat() const
-{
- return mInstance->getActualFormat();
-}
-
-GLuint Renderbuffer::getRedSize() const
-{
- return gl::GetRedBits(getActualFormat(), mRenderer->getCurrentClientVersion());
-}
-
-GLuint Renderbuffer::getGreenSize() const
-{
- return gl::GetGreenBits(getActualFormat(), mRenderer->getCurrentClientVersion());
-}
-
-GLuint Renderbuffer::getBlueSize() const
-{
- return gl::GetBlueBits(getActualFormat(), mRenderer->getCurrentClientVersion());
-}
-
-GLuint Renderbuffer::getAlphaSize() const
-{
- return gl::GetAlphaBits(getActualFormat(), mRenderer->getCurrentClientVersion());
-}
-
-GLuint Renderbuffer::getDepthSize() const
-{
- return gl::GetDepthBits(getActualFormat(), mRenderer->getCurrentClientVersion());
-}
-
-GLuint Renderbuffer::getStencilSize() const
-{
- return gl::GetStencilBits(getActualFormat(), mRenderer->getCurrentClientVersion());
-}
-
-GLenum Renderbuffer::getComponentType() const
-{
- return gl::GetComponentType(getActualFormat(), mRenderer->getCurrentClientVersion());
-}
-
-GLenum Renderbuffer::getColorEncoding() const
-{
- return gl::GetColorEncoding(getActualFormat(), mRenderer->getCurrentClientVersion());
-}
-
-GLsizei Renderbuffer::getSamples() const
-{
- return mInstance->getSamples();
-}
-
-unsigned int Renderbuffer::getSerial() const
-{
- return mInstance->getSerial();
-}
-
-bool Renderbuffer::isTexture() const
-{
- return mInstance->isTexture();
-}
-
-unsigned int Renderbuffer::getTextureSerial() const
-{
- return mInstance->getTextureSerial();
-}
-
-void Renderbuffer::setStorage(RenderbufferStorage *newStorage)
-{
- ASSERT(newStorage != NULL);
-
- delete mInstance;
- mInstance = newStorage;
-}
-
RenderbufferStorage::RenderbufferStorage() : mSerial(issueSerials(1))
{
mWidth = 0;
diff --git a/src/libGLESv2/Renderbuffer.h b/src/libGLESv2/Renderbuffer.h
index 969232b1..4da447ae 100644
--- a/src/libGLESv2/Renderbuffer.h
+++ b/src/libGLESv2/Renderbuffer.h
@@ -17,6 +17,7 @@
#include "common/angleutils.h"
#include "common/RefCountObject.h"
+#include "libGLESv2/FramebufferAttachment.h"
namespace rx
{
@@ -28,178 +29,11 @@ class TextureStorage;
namespace gl
{
-class Texture2D;
-class TextureCubeMap;
-class Texture3D;
-class Texture2DArray;
-class Renderbuffer;
-class Colorbuffer;
-class DepthStencilbuffer;
-
-class RenderbufferInterface
-{
- public:
- RenderbufferInterface();
-
- virtual ~RenderbufferInterface() {};
-
- virtual void addProxyRef(const Renderbuffer *proxy);
- virtual void releaseProxy(const Renderbuffer *proxy);
-
- virtual rx::RenderTarget *getRenderTarget() = 0;
- virtual rx::RenderTarget *getDepthStencil() = 0;
- virtual rx::TextureStorage *getTextureStorage() = 0;
-
- virtual GLsizei getWidth() const = 0;
- virtual GLsizei getHeight() const = 0;
- virtual GLenum getInternalFormat() const = 0;
- virtual GLenum getActualFormat() const = 0;
- virtual GLsizei getSamples() const = 0;
-
- virtual unsigned int getSerial() const = 0;
-
- virtual bool isTexture() const = 0;
- virtual unsigned int getTextureSerial() const = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RenderbufferInterface);
-};
-
-class RenderbufferTexture2D : public RenderbufferInterface
-{
- public:
- RenderbufferTexture2D(Texture2D *texture, GLint level);
-
- virtual ~RenderbufferTexture2D();
-
- void addProxyRef(const Renderbuffer *proxy);
- void releaseProxy(const Renderbuffer *proxy);
-
- rx::RenderTarget *getRenderTarget();
- rx::RenderTarget *getDepthStencil();
- rx::TextureStorage *getTextureStorage();
-
- virtual GLsizei getWidth() const;
- virtual GLsizei getHeight() const;
- virtual GLenum getInternalFormat() const;
- virtual GLenum getActualFormat() const;
- virtual GLsizei getSamples() const;
-
- virtual unsigned int getSerial() const;
-
- virtual bool isTexture() const;
- virtual unsigned int getTextureSerial() const;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RenderbufferTexture2D);
-
- BindingPointer <Texture2D> mTexture2D;
- const GLint mLevel;
-};
-
-class RenderbufferTextureCubeMap : public RenderbufferInterface
-{
- public:
- RenderbufferTextureCubeMap(TextureCubeMap *texture, GLenum faceTarget, GLint level);
-
- virtual ~RenderbufferTextureCubeMap();
-
- void addProxyRef(const Renderbuffer *proxy);
- void releaseProxy(const Renderbuffer *proxy);
-
- rx::RenderTarget *getRenderTarget();
- rx::RenderTarget *getDepthStencil();
- rx::TextureStorage *getTextureStorage();
-
- virtual GLsizei getWidth() const;
- virtual GLsizei getHeight() const;
- virtual GLenum getInternalFormat() const;
- virtual GLenum getActualFormat() const;
- virtual GLsizei getSamples() const;
-
- virtual unsigned int getSerial() const;
-
- virtual bool isTexture() const;
- virtual unsigned int getTextureSerial() const;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RenderbufferTextureCubeMap);
-
- BindingPointer <TextureCubeMap> mTextureCubeMap;
- const GLint mLevel;
- const GLenum mFaceTarget;
-};
-
-class RenderbufferTexture3DLayer : public RenderbufferInterface
-{
-public:
- RenderbufferTexture3DLayer(Texture3D *texture, GLint level, GLint layer);
-
- virtual ~RenderbufferTexture3DLayer();
-
- void addProxyRef(const Renderbuffer *proxy);
- void releaseProxy(const Renderbuffer *proxy);
-
- rx::RenderTarget *getRenderTarget();
- rx::RenderTarget *getDepthStencil();
- rx::TextureStorage *getTextureStorage();
-
- virtual GLsizei getWidth() const;
- virtual GLsizei getHeight() const;
- virtual GLenum getInternalFormat() const;
- virtual GLenum getActualFormat() const;
- virtual GLsizei getSamples() const;
-
- virtual unsigned int getSerial() const;
-
- virtual bool isTexture() const;
- virtual unsigned int getTextureSerial() const;
-
-private:
- DISALLOW_COPY_AND_ASSIGN(RenderbufferTexture3DLayer);
-
- BindingPointer<Texture3D> mTexture3D;
- const GLint mLevel;
- const GLint mLayer;
-};
-
-class RenderbufferTexture2DArrayLayer : public RenderbufferInterface
-{
-public:
- RenderbufferTexture2DArrayLayer(Texture2DArray *texture, GLint level, GLint layer);
-
- virtual ~RenderbufferTexture2DArrayLayer();
-
- void addProxyRef(const Renderbuffer *proxy);
- void releaseProxy(const Renderbuffer *proxy);
-
- rx::RenderTarget *getRenderTarget();
- rx::RenderTarget *getDepthStencil();
- rx::TextureStorage *getTextureStorage();
-
- virtual GLsizei getWidth() const;
- virtual GLsizei getHeight() const;
- virtual GLenum getInternalFormat() const;
- virtual GLenum getActualFormat() const;
- virtual GLsizei getSamples() const;
-
- virtual unsigned int getSerial() const;
-
- virtual bool isTexture() const;
- virtual unsigned int getTextureSerial() const;
-
-private:
- DISALLOW_COPY_AND_ASSIGN(RenderbufferTexture2DArrayLayer);
-
- BindingPointer<Texture2DArray> mTexture2DArray;
- const GLint mLevel;
- const GLint mLayer;
-};
// A class derived from RenderbufferStorage is created whenever glRenderbufferStorage
// is called. The specific concrete type depends on whether the internal format is
// colour depth, stencil or packed depth/stencil.
-class RenderbufferStorage : public RenderbufferInterface
+class RenderbufferStorage : public FramebufferAttachmentInterface
{
public:
RenderbufferStorage();
@@ -238,55 +72,6 @@ class RenderbufferStorage : public RenderbufferInterface
static unsigned int mCurrentSerial;
};
-// Renderbuffer implements the GL renderbuffer object.
-// It's only a proxy for a RenderbufferInterface instance; the internal object
-// can change whenever glRenderbufferStorage is called.
-class Renderbuffer : public RefCountObject
-{
- public:
- Renderbuffer(rx::Renderer *renderer, GLuint id, RenderbufferInterface *storage);
-
- virtual ~Renderbuffer();
-
- // These functions from RefCountObject are overloaded here because
- // Textures need to maintain their own count of references to them via
- // Renderbuffers/RenderbufferTextures. These functions invoke those
- // reference counting functions on the RenderbufferInterface.
- void addRef() const;
- void release() const;
-
- rx::RenderTarget *getRenderTarget();
- rx::RenderTarget *getDepthStencil();
- rx::TextureStorage *getTextureStorage();
-
- GLsizei getWidth() const;
- GLsizei getHeight() const;
- GLenum getInternalFormat() const;
- GLenum getActualFormat() const;
- GLuint getRedSize() const;
- GLuint getGreenSize() const;
- GLuint getBlueSize() const;
- GLuint getAlphaSize() const;
- GLuint getDepthSize() const;
- GLuint getStencilSize() const;
- GLenum getComponentType() const;
- GLenum getColorEncoding() const;
- GLsizei getSamples() const;
-
- unsigned int getSerial() const;
-
- bool isTexture() const;
- unsigned int getTextureSerial() const;
-
- void setStorage(RenderbufferStorage *newStorage);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Renderbuffer);
-
- rx::Renderer const *mRenderer;
- RenderbufferInterface *mInstance;
-};
-
class Colorbuffer : public RenderbufferStorage
{
public:
diff --git a/src/libGLESv2/RenderbufferProxySet.cpp b/src/libGLESv2/RenderbufferProxySet.cpp
index 009c7a6b..f4fbe513 100644
--- a/src/libGLESv2/RenderbufferProxySet.cpp
+++ b/src/libGLESv2/RenderbufferProxySet.cpp
@@ -14,7 +14,7 @@
namespace gl
{
-void RenderbufferProxySet::addRef(const Renderbuffer *proxy)
+void RenderbufferProxySet::addRef(const FramebufferAttachment *proxy)
{
RefCountMap::iterator i = mRefCountMap.find(proxy);
if (i != mRefCountMap.end())
@@ -23,7 +23,7 @@ void RenderbufferProxySet::addRef(const Renderbuffer *proxy)
}
}
-void RenderbufferProxySet::release(const Renderbuffer *proxy)
+void RenderbufferProxySet::release(const FramebufferAttachment *proxy)
{
RefCountMap::iterator i = mRefCountMap.find(proxy);
if (i != mRefCountMap.end())
@@ -35,7 +35,7 @@ void RenderbufferProxySet::release(const Renderbuffer *proxy)
if (i->second == 0)
{
- // Clear the buffer map of references to this Renderbuffer
+ // Clear the buffer map of references to this FramebufferAttachment
BufferMap::iterator j = mBufferMap.begin();
while (j != mBufferMap.end())
{
@@ -54,7 +54,7 @@ void RenderbufferProxySet::release(const Renderbuffer *proxy)
}
}
-void RenderbufferProxySet::add(unsigned int mipLevel, unsigned int layer, Renderbuffer *renderBuffer)
+void RenderbufferProxySet::add(unsigned int mipLevel, unsigned int layer, FramebufferAttachment *renderBuffer)
{
if (mRefCountMap.find(renderBuffer) == mRefCountMap.end())
{
@@ -70,7 +70,7 @@ void RenderbufferProxySet::add(unsigned int mipLevel, unsigned int layer, Render
}
}
-Renderbuffer *RenderbufferProxySet::get(unsigned int mipLevel, unsigned int layer) const
+FramebufferAttachment *RenderbufferProxySet::get(unsigned int mipLevel, unsigned int layer) const
{
RenderbufferKey key;
key.mipLevel = mipLevel;
diff --git a/src/libGLESv2/RenderbufferProxySet.h b/src/libGLESv2/RenderbufferProxySet.h
index ae5bf944..f1511515 100644
--- a/src/libGLESv2/RenderbufferProxySet.h
+++ b/src/libGLESv2/RenderbufferProxySet.h
@@ -14,16 +14,16 @@
namespace gl
{
-class Renderbuffer;
+class FramebufferAttachment;
class RenderbufferProxySet
{
public:
- void addRef(const Renderbuffer *proxy);
- void release(const Renderbuffer *proxy);
+ void addRef(const FramebufferAttachment *proxy);
+ void release(const FramebufferAttachment *proxy);
- void add(unsigned int mipLevel, unsigned int layer, Renderbuffer *renderBuffer);
- Renderbuffer *get(unsigned int mipLevel, unsigned int layer) const;
+ void add(unsigned int mipLevel, unsigned int layer, FramebufferAttachment *renderBuffer);
+ FramebufferAttachment *get(unsigned int mipLevel, unsigned int layer) const;
private:
struct RenderbufferKey
@@ -34,10 +34,10 @@ class RenderbufferProxySet
bool operator<(const RenderbufferKey &other) const;
};
- typedef std::map<RenderbufferKey, Renderbuffer*> BufferMap;
+ typedef std::map<RenderbufferKey, FramebufferAttachment*> BufferMap;
BufferMap mBufferMap;
- typedef std::map<const Renderbuffer*, unsigned int> RefCountMap;
+ typedef std::map<const FramebufferAttachment*, unsigned int> RefCountMap;
RefCountMap mRefCountMap;
};
diff --git a/src/libGLESv2/ResourceManager.cpp b/src/libGLESv2/ResourceManager.cpp
index 97c28cb9..cf0812d7 100644
--- a/src/libGLESv2/ResourceManager.cpp
+++ b/src/libGLESv2/ResourceManager.cpp
@@ -311,7 +311,7 @@ Program *ResourceManager::getProgram(unsigned int handle)
}
}
-Renderbuffer *ResourceManager::getRenderbuffer(unsigned int handle)
+FramebufferAttachment *ResourceManager::getRenderbuffer(unsigned int handle)
{
RenderbufferMap::iterator renderbuffer = mRenderbufferMap.find(handle);
@@ -353,7 +353,7 @@ FenceSync *ResourceManager::getFenceSync(unsigned int handle)
}
}
-void ResourceManager::setRenderbuffer(GLuint handle, Renderbuffer *buffer)
+void ResourceManager::setRenderbuffer(GLuint handle, FramebufferAttachment *buffer)
{
mRenderbufferMap[handle] = buffer;
}
@@ -405,7 +405,7 @@ void ResourceManager::checkRenderbufferAllocation(GLuint renderbuffer)
{
if (renderbuffer != 0 && !getRenderbuffer(renderbuffer))
{
- Renderbuffer *renderbufferObject = new Renderbuffer(mRenderer, renderbuffer, new Colorbuffer(mRenderer, 0, 0, GL_RGBA4, 0));
+ FramebufferAttachment *renderbufferObject = new FramebufferAttachment(mRenderer, renderbuffer, new Colorbuffer(mRenderer, 0, 0, GL_RGBA4, 0));
mRenderbufferMap[renderbuffer] = renderbufferObject;
renderbufferObject->addRef();
}
diff --git a/src/libGLESv2/ResourceManager.h b/src/libGLESv2/ResourceManager.h
index 85e6b4bc..a08a6aae 100644
--- a/src/libGLESv2/ResourceManager.h
+++ b/src/libGLESv2/ResourceManager.h
@@ -30,7 +30,7 @@ class Buffer;
class Shader;
class Program;
class Texture;
-class Renderbuffer;
+class FramebufferAttachment;
class Sampler;
class FenceSync;
@@ -63,11 +63,11 @@ class ResourceManager
Shader *getShader(GLuint handle);
Program *getProgram(GLuint handle);
Texture *getTexture(GLuint handle);
- Renderbuffer *getRenderbuffer(GLuint handle);
+ FramebufferAttachment *getRenderbuffer(GLuint handle);
Sampler *getSampler(GLuint handle);
FenceSync *getFenceSync(GLuint handle);
- void setRenderbuffer(GLuint handle, Renderbuffer *renderbuffer);
+ void setRenderbuffer(GLuint handle, FramebufferAttachment *renderbuffer);
void checkBufferAllocation(unsigned int buffer);
void checkTextureAllocation(GLuint texture, TextureType type);
@@ -97,7 +97,7 @@ class ResourceManager
TextureMap mTextureMap;
HandleAllocator mTextureHandleAllocator;
- typedef std::unordered_map<GLuint, Renderbuffer*> RenderbufferMap;
+ typedef std::unordered_map<GLuint, FramebufferAttachment*> RenderbufferMap;
RenderbufferMap mRenderbufferMap;
HandleAllocator mRenderbufferHandleAllocator;
diff --git a/src/libGLESv2/Texture.cpp b/src/libGLESv2/Texture.cpp
index 68d368b6..baa5bc68 100644
--- a/src/libGLESv2/Texture.cpp
+++ b/src/libGLESv2/Texture.cpp
@@ -87,12 +87,12 @@ GLenum Texture::getTarget() const
return mTarget;
}
-void Texture::addProxyRef(const Renderbuffer *proxy)
+void Texture::addProxyRef(const FramebufferAttachment *proxy)
{
mRenderbufferProxies.addRef(proxy);
}
-void Texture::releaseProxy(const Renderbuffer *proxy)
+void Texture::releaseProxy(const FramebufferAttachment *proxy)
{
mRenderbufferProxies.release(proxy);
}
@@ -698,11 +698,6 @@ void Texture2D::copyImage(GLint level, GLenum format, GLint x, GLint y, GLsizei
void Texture2D::copySubImage(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height, Framebuffer *source)
{
- if (xoffset + width > mImageArray[level]->getWidth() || yoffset + height > mImageArray[level]->getHeight() || zoffset != 0)
- {
- return gl::error(GL_INVALID_VALUE);
- }
-
// can only make our texture storage to a render target if level 0 is defined (with a width & height) and
// the current level we're copying to is defined (with appropriate format, width & height)
bool canCreateRenderTarget = isLevelComplete(level) && isLevelComplete(0);
@@ -1032,16 +1027,16 @@ rx::TextureStorageInterface *Texture2D::getBaseLevelStorage()
return mTexStorage;
}
-Renderbuffer *Texture2D::getRenderbuffer(GLint level)
+FramebufferAttachment *Texture2D::getAttachment(GLint level)
{
- Renderbuffer *renderBuffer = mRenderbufferProxies.get(level, 0);
- if (!renderBuffer)
+ FramebufferAttachment *attachment = mRenderbufferProxies.get(level, 0);
+ if (!attachment)
{
- renderBuffer = new Renderbuffer(mRenderer, id(), new RenderbufferTexture2D(this, level));
- mRenderbufferProxies.add(level, 0, renderBuffer);
+ attachment = new FramebufferAttachment(mRenderer, id(), new Texture2DAttachment(this, level));
+ mRenderbufferProxies.add(level, 0, attachment);
}
- return renderBuffer;
+ return attachment;
}
unsigned int Texture2D::getRenderTargetSerial(GLint level)
@@ -1562,13 +1557,6 @@ void TextureCubeMap::copySubImage(GLenum target, GLint level, GLint xoffset, GLi
{
int faceIndex = targetToIndex(target);
- GLsizei size = mImageArray[faceIndex][level]->getWidth();
-
- if (xoffset + width > size || yoffset + height > size || zoffset != 0)
- {
- return gl::error(GL_INVALID_VALUE);
- }
-
// We can only make our texture storage to a render target if the level we're copying *to* is complete
// and the base level is cube-complete. The base level must be cube complete (common case) because we cannot
// rely on the "getBaseLevel*" methods reliably otherwise.
@@ -1674,23 +1662,19 @@ rx::TextureStorageInterface *TextureCubeMap::getBaseLevelStorage()
return mTexStorage;
}
-Renderbuffer *TextureCubeMap::getRenderbuffer(GLenum target, GLint level)
+FramebufferAttachment *TextureCubeMap::getAttachment(GLenum target, GLint level)
{
- if (!IsCubemapTextureTarget(target))
- {
- return gl::error(GL_INVALID_OPERATION, (Renderbuffer *)NULL);
- }
-
+ ASSERT(!IsCubemapTextureTarget(target));
int faceIndex = targetToIndex(target);
- Renderbuffer *renderBuffer = mRenderbufferProxies.get(level, faceIndex);
- if (!renderBuffer)
+ FramebufferAttachment *attachment = mRenderbufferProxies.get(level, faceIndex);
+ if (!attachment)
{
- renderBuffer = new Renderbuffer(mRenderer, id(), new RenderbufferTextureCubeMap(this, target, level));
- mRenderbufferProxies.add(level, faceIndex, renderBuffer);
+ attachment = new FramebufferAttachment(mRenderer, id(), new TextureCubeMapAttachment(this, target, level));
+ mRenderbufferProxies.add(level, faceIndex, attachment);
}
- return renderBuffer;
+ return attachment;
}
unsigned int TextureCubeMap::getRenderTargetSerial(GLenum target, GLint level)
@@ -1935,11 +1919,6 @@ rx::TextureStorageInterface *Texture3D::getBaseLevelStorage()
void Texture3D::copySubImage(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height, Framebuffer *source)
{
- if (xoffset + width > mImageArray[level]->getWidth() || yoffset + height > mImageArray[level]->getHeight() || zoffset >= mImageArray[level]->getDepth())
- {
- return gl::error(GL_INVALID_VALUE);
- }
-
// can only make our texture storage to a render target if level 0 is defined (with a width & height) and
// the current level we're copying to is defined (with appropriate format, width & height)
bool canCreateRenderTarget = isLevelComplete(level) && isLevelComplete(0);
@@ -2063,16 +2042,16 @@ bool Texture3D::isLevelComplete(int level) const
return true;
}
-Renderbuffer *Texture3D::getRenderbuffer(GLint level, GLint layer)
+FramebufferAttachment *Texture3D::getAttachment(GLint level, GLint layer)
{
- Renderbuffer *renderBuffer = mRenderbufferProxies.get(level, layer);
- if (!renderBuffer)
+ FramebufferAttachment *attachment = mRenderbufferProxies.get(level, layer);
+ if (!attachment)
{
- renderBuffer = new Renderbuffer(mRenderer, id(), new RenderbufferTexture3DLayer(this, level, layer));
- mRenderbufferProxies.add(level, 0, renderBuffer);
+ attachment = new FramebufferAttachment(mRenderer, id(), new Texture3DAttachment(this, level, layer));
+ mRenderbufferProxies.add(level, 0, attachment);
}
- return renderBuffer;
+ return attachment;
}
unsigned int Texture3D::getRenderTargetSerial(GLint level, GLint layer)
@@ -2494,11 +2473,6 @@ rx::TextureStorageInterface *Texture2DArray::getBaseLevelStorage()
void Texture2DArray::copySubImage(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height, Framebuffer *source)
{
- if (xoffset + width > getWidth(level) || yoffset + height > getHeight(level) || zoffset >= getLayers(level) || getLayers(level) == 0)
- {
- return gl::error(GL_INVALID_VALUE);
- }
-
// can only make our texture storage to a render target if level 0 is defined (with a width & height) and
// the current level we're copying to is defined (with appropriate format, width & height)
bool canCreateRenderTarget = isLevelComplete(level) && isLevelComplete(0);
@@ -2619,16 +2593,16 @@ bool Texture2DArray::isLevelComplete(int level) const
return true;
}
-Renderbuffer *Texture2DArray::getRenderbuffer(GLint level, GLint layer)
+FramebufferAttachment *Texture2DArray::getAttachment(GLint level, GLint layer)
{
- Renderbuffer *renderBuffer = mRenderbufferProxies.get(level, layer);
- if (!renderBuffer)
+ FramebufferAttachment *attachment = mRenderbufferProxies.get(level, layer);
+ if (!attachment)
{
- renderBuffer = new Renderbuffer(mRenderer, id(), new RenderbufferTexture2DArrayLayer(this, level, layer));
- mRenderbufferProxies.add(level, 0, renderBuffer);
+ attachment = new FramebufferAttachment(mRenderer, id(), new Texture2DArrayAttachment(this, level, layer));
+ mRenderbufferProxies.add(level, 0, attachment);
}
- return renderBuffer;
+ return attachment;
}
unsigned int Texture2DArray::getRenderTargetSerial(GLint level, GLint layer)
diff --git a/src/libGLESv2/Texture.h b/src/libGLESv2/Texture.h
index a44a7019..84ca2898 100644
--- a/src/libGLESv2/Texture.h
+++ b/src/libGLESv2/Texture.h
@@ -41,7 +41,7 @@ class Image;
namespace gl
{
class Framebuffer;
-class Renderbuffer;
+class FramebufferAttachment;
enum
{
@@ -65,8 +65,8 @@ class Texture : public RefCountObject
virtual ~Texture();
- void addProxyRef(const Renderbuffer *proxy);
- void releaseProxy(const Renderbuffer *proxy);
+ void addProxyRef(const FramebufferAttachment *proxy);
+ void releaseProxy(const FramebufferAttachment *proxy);
GLenum getTarget() const;
@@ -161,7 +161,7 @@ class Texture : public RefCountObject
// because, as the renderbuffer acting as proxy will maintain a binding pointer
// back to this texture, there would be a circular reference if we used a binding
// pointer here. This reference count will cause the pointer to be set to NULL if
- // the count drops to zero, but will not cause deletion of the Renderbuffer.
+ // the count drops to zero, but will not cause deletion of the FramebufferAttachment.
RenderbufferProxySet mRenderbufferProxies;
private:
@@ -199,11 +199,11 @@ class Texture2D : public Texture
virtual void generateMipmaps();
- Renderbuffer *getRenderbuffer(GLint level);
+ FramebufferAttachment *getAttachment(GLint level);
unsigned int getRenderTargetSerial(GLint level);
protected:
- friend class RenderbufferTexture2D;
+ friend class Texture2DAttachment;
rx::RenderTarget *getRenderTarget(GLint level);
rx::RenderTarget *getDepthSencil(GLint level);
@@ -267,13 +267,13 @@ class TextureCubeMap : public Texture
virtual void generateMipmaps();
- Renderbuffer *getRenderbuffer(GLenum target, GLint level);
+ FramebufferAttachment *getAttachment(GLenum target, GLint level);
unsigned int getRenderTargetSerial(GLenum target, GLint level);
static int targetToIndex(GLenum target);
protected:
- friend class RenderbufferTextureCubeMap;
+ friend class TextureCubeMapAttachment;
rx::RenderTarget *getRenderTarget(GLenum target, GLint level);
rx::RenderTarget *getDepthStencil(GLenum target, GLint level);
@@ -330,11 +330,11 @@ class Texture3D : public Texture
virtual bool isSamplerComplete(const SamplerState &samplerState) const;
virtual bool isMipmapComplete() const;
- Renderbuffer *getRenderbuffer(GLint level, GLint layer);
+ FramebufferAttachment *getAttachment(GLint level, GLint layer);
unsigned int getRenderTargetSerial(GLint level, GLint layer);
protected:
- friend class RenderbufferTexture3DLayer;
+ friend class Texture3DAttachment;
rx::RenderTarget *getRenderTarget(GLint level);
rx::RenderTarget *getRenderTarget(GLint level, GLint layer);
rx::RenderTarget *getDepthStencil(GLint level, GLint layer);
@@ -391,11 +391,11 @@ class Texture2DArray : public Texture
virtual bool isSamplerComplete(const SamplerState &samplerState) const;
virtual bool isMipmapComplete() const;
- Renderbuffer *getRenderbuffer(GLint level, GLint layer);
+ FramebufferAttachment *getAttachment(GLint level, GLint layer);
unsigned int getRenderTargetSerial(GLint level, GLint layer);
protected:
- friend class RenderbufferTexture2DArrayLayer;
+ friend class Texture2DArrayAttachment;
rx::RenderTarget *getRenderTarget(GLint level, GLint layer);
rx::RenderTarget *getDepthStencil(GLint level, GLint layer);
diff --git a/src/libGLESv2/libGLESv2.cpp b/src/libGLESv2/libGLESv2.cpp
index 85afdd36..bf3cd0fd 100644
--- a/src/libGLESv2/libGLESv2.cpp
+++ b/src/libGLESv2/libGLESv2.cpp
@@ -844,14 +844,14 @@ void __stdcall glCompressedTexImage2D(GLenum target, GLint level, GLenum interna
{
if (context->getClientVersion() < 3 &&
!ValidateES2TexImageParameters(context, target, level, internalformat, true, false,
- 0, 0, width, height, 0, GL_NONE, GL_NONE, data))
+ 0, 0, width, height, border, GL_NONE, GL_NONE, data))
{
return;
}
if (context->getClientVersion() >= 3 &&
!ValidateES3TexImageParameters(context, target, level, internalformat, true, false,
- 0, 0, 0, width, height, 1, 0, GL_NONE, GL_NONE, data))
+ 0, 0, 0, width, height, 1, border, GL_NONE, GL_NONE, data))
{
return;
}
@@ -2692,11 +2692,11 @@ void __stdcall glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attac
GLuint attachmentHandle;
GLuint attachmentLevel;
GLuint attachmentLayer;
- gl::Renderbuffer *renderbuffer;
+ gl::FramebufferAttachment *attachmentObject;
- if(framebufferHandle == 0)
+ if (framebufferHandle == 0)
{
- if(context->getClientVersion() < 3)
+ if (context->getClientVersion() < 3)
{
return gl::error(GL_INVALID_OPERATION);
}
@@ -2708,21 +2708,21 @@ void __stdcall glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attac
attachmentHandle = framebuffer->getColorbufferHandle(0);
attachmentLevel = framebuffer->getColorbufferMipLevel(0);
attachmentLayer = framebuffer->getColorbufferLayer(0);
- renderbuffer = framebuffer->getColorbuffer(0);
+ attachmentObject = framebuffer->getColorbuffer(0);
break;
case GL_DEPTH:
attachmentType = framebuffer->getDepthbufferType();
attachmentHandle = framebuffer->getDepthbufferHandle();
attachmentLevel = framebuffer->getDepthbufferMipLevel();
attachmentLayer = framebuffer->getDepthbufferLayer();
- renderbuffer = framebuffer->getDepthbuffer();
+ attachmentObject = framebuffer->getDepthbuffer();
break;
case GL_STENCIL:
attachmentType = framebuffer->getStencilbufferType();
attachmentHandle = framebuffer->getStencilbufferHandle();
attachmentLevel = framebuffer->getStencilbufferMipLevel();
attachmentLayer = framebuffer->getStencilbufferLayer();
- renderbuffer = framebuffer->getStencilbuffer();
+ attachmentObject = framebuffer->getStencilbuffer();
break;
default:
return gl::error(GL_INVALID_OPERATION);
@@ -2737,7 +2737,7 @@ void __stdcall glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attac
attachmentHandle = framebuffer->getColorbufferHandle(colorAttachment);
attachmentLevel = framebuffer->getColorbufferMipLevel(colorAttachment);
attachmentLayer = framebuffer->getColorbufferLayer(colorAttachment);
- renderbuffer = framebuffer->getColorbuffer(colorAttachment);
+ attachmentObject = framebuffer->getColorbuffer(colorAttachment);
}
else
{
@@ -2748,14 +2748,14 @@ void __stdcall glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attac
attachmentHandle = framebuffer->getDepthbufferHandle();
attachmentLevel = framebuffer->getDepthbufferMipLevel();
attachmentLayer = framebuffer->getDepthbufferLayer();
- renderbuffer = framebuffer->getDepthbuffer();
+ attachmentObject = framebuffer->getDepthbuffer();
break;
case GL_STENCIL_ATTACHMENT:
attachmentType = framebuffer->getStencilbufferType();
attachmentHandle = framebuffer->getStencilbufferHandle();
attachmentLevel = framebuffer->getStencilbufferMipLevel();
attachmentLayer = framebuffer->getStencilbufferLayer();
- renderbuffer = framebuffer->getStencilbuffer();
+ attachmentObject = framebuffer->getStencilbuffer();
break;
case GL_DEPTH_STENCIL_ATTACHMENT:
if (framebuffer->getDepthbufferHandle() != framebuffer->getStencilbufferHandle())
@@ -2766,7 +2766,7 @@ void __stdcall glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attac
attachmentHandle = framebuffer->getDepthStencilbufferHandle();
attachmentLevel = framebuffer->getDepthStencilbufferMipLevel();
attachmentLayer = framebuffer->getDepthStencilbufferLayer();
- renderbuffer = framebuffer->getDepthStencilBuffer();
+ attachmentObject = framebuffer->getDepthStencilBuffer();
break;
default:
return gl::error(GL_INVALID_OPERATION);
@@ -2831,7 +2831,7 @@ void __stdcall glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attac
{
ASSERT(attachmentObjectType == GL_RENDERBUFFER || attachmentObjectType == GL_TEXTURE ||
attachmentObjectType == GL_FRAMEBUFFER_DEFAULT);
- ASSERT(renderbuffer != NULL);
+ ASSERT(attachmentObject != NULL);
switch (pname)
{
@@ -2864,27 +2864,27 @@ void __stdcall glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attac
break;
case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE:
- *params = renderbuffer->getRedSize();
+ *params = attachmentObject->getRedSize();
break;
case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:
- *params = renderbuffer->getGreenSize();
+ *params = attachmentObject->getGreenSize();
break;
case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:
- *params = renderbuffer->getBlueSize();
+ *params = attachmentObject->getBlueSize();
break;
case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
- *params = renderbuffer->getAlphaSize();
+ *params = attachmentObject->getAlphaSize();
break;
case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:
- *params = renderbuffer->getDepthSize();
+ *params = attachmentObject->getDepthSize();
break;
case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
- *params = renderbuffer->getStencilSize();
+ *params = attachmentObject->getStencilSize();
break;
case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:
@@ -2892,11 +2892,11 @@ void __stdcall glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attac
{
gl::error(GL_INVALID_OPERATION);
}
- *params = renderbuffer->getComponentType();
+ *params = attachmentObject->getComponentType();
break;
case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:
- *params = renderbuffer->getColorEncoding();
+ *params = attachmentObject->getColorEncoding();
break;
case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:
@@ -3188,23 +3188,23 @@ void __stdcall glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint*
return gl::error(GL_INVALID_OPERATION);
}
- gl::Renderbuffer *renderbuffer = context->getRenderbuffer(context->getRenderbufferHandle());
+ gl::FramebufferAttachment *attachment = context->getRenderbuffer(context->getRenderbufferHandle());
switch (pname)
{
- case GL_RENDERBUFFER_WIDTH: *params = renderbuffer->getWidth(); break;
- case GL_RENDERBUFFER_HEIGHT: *params = renderbuffer->getHeight(); break;
- case GL_RENDERBUFFER_INTERNAL_FORMAT: *params = renderbuffer->getInternalFormat(); break;
- case GL_RENDERBUFFER_RED_SIZE: *params = renderbuffer->getRedSize(); break;
- case GL_RENDERBUFFER_GREEN_SIZE: *params = renderbuffer->getGreenSize(); break;
- case GL_RENDERBUFFER_BLUE_SIZE: *params = renderbuffer->getBlueSize(); break;
- case GL_RENDERBUFFER_ALPHA_SIZE: *params = renderbuffer->getAlphaSize(); break;
- case GL_RENDERBUFFER_DEPTH_SIZE: *params = renderbuffer->getDepthSize(); break;
- case GL_RENDERBUFFER_STENCIL_SIZE: *params = renderbuffer->getStencilSize(); break;
+ case GL_RENDERBUFFER_WIDTH: *params = attachment->getWidth(); break;
+ case GL_RENDERBUFFER_HEIGHT: *params = attachment->getHeight(); break;
+ case GL_RENDERBUFFER_INTERNAL_FORMAT: *params = attachment->getInternalFormat(); break;
+ case GL_RENDERBUFFER_RED_SIZE: *params = attachment->getRedSize(); break;
+ case GL_RENDERBUFFER_GREEN_SIZE: *params = attachment->getGreenSize(); break;
+ case GL_RENDERBUFFER_BLUE_SIZE: *params = attachment->getBlueSize(); break;
+ case GL_RENDERBUFFER_ALPHA_SIZE: *params = attachment->getAlphaSize(); break;
+ case GL_RENDERBUFFER_DEPTH_SIZE: *params = attachment->getDepthSize(); break;
+ case GL_RENDERBUFFER_STENCIL_SIZE: *params = attachment->getStencilSize(); break;
case GL_RENDERBUFFER_SAMPLES_ANGLE:
if (context->getMaxSupportedSamples() != 0)
{
- *params = renderbuffer->getSamples();
+ *params = attachment->getSamples();
}
else
{
@@ -4237,7 +4237,7 @@ GLboolean __stdcall glIsRenderbuffer(GLuint renderbuffer)
if (context && renderbuffer)
{
- gl::Renderbuffer *renderbufferObject = context->getRenderbuffer(renderbuffer);
+ gl::FramebufferAttachment *renderbufferObject = context->getRenderbuffer(renderbuffer);
if (renderbufferObject)
{
@@ -6118,18 +6118,12 @@ void __stdcall glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GL
return gl::error(GL_INVALID_OPERATION);
}
- if (!ValidateES3CopyTexImageParameters(context, target, level, GL_NONE, false, xoffset, yoffset, zoffset,
+ if (!ValidateES3CopyTexImageParameters(context, target, level, GL_NONE, true, xoffset, yoffset, zoffset,
x, y, width, height, 0))
{
return;
}
- // Zero sized copies are valid but no-ops
- if (width == 0 || height == 0)
- {
- return;
- }
-
gl::Framebuffer *framebuffer = context->getReadFramebuffer();
gl::Texture *texture = NULL;
switch (target)
diff --git a/src/libGLESv2/renderer/d3d11/Clear11.cpp b/src/libGLESv2/renderer/d3d11/Clear11.cpp
index c02cd9ed..bb732413 100644
--- a/src/libGLESv2/renderer/d3d11/Clear11.cpp
+++ b/src/libGLESv2/renderer/d3d11/Clear11.cpp
@@ -169,16 +169,16 @@ void Clear11::clearFramebuffer(const gl::ClearParameters &clearParams, gl::Frame
gl::Extents framebufferSize;
if (frameBuffer->getFirstColorbuffer() != NULL)
{
- gl::Renderbuffer *renderBuffer = frameBuffer->getFirstColorbuffer();
- framebufferSize.width = renderBuffer->getWidth();
- framebufferSize.height = renderBuffer->getHeight();
+ gl::FramebufferAttachment *attachment = frameBuffer->getFirstColorbuffer();
+ framebufferSize.width = attachment->getWidth();
+ framebufferSize.height = attachment->getHeight();
framebufferSize.depth = 1;
}
else if (frameBuffer->getDepthOrStencilbuffer() != NULL)
{
- gl::Renderbuffer *renderBuffer = frameBuffer->getDepthOrStencilbuffer();
- framebufferSize.width = renderBuffer->getWidth();
- framebufferSize.height = renderBuffer->getHeight();
+ gl::FramebufferAttachment *attachment = frameBuffer->getDepthOrStencilbuffer();
+ framebufferSize.width = attachment->getWidth();
+ framebufferSize.height = attachment->getHeight();
framebufferSize.depth = 1;
}
else
@@ -211,18 +211,18 @@ void Clear11::clearFramebuffer(const gl::ClearParameters &clearParams, gl::Frame
{
if (clearParams.clearColor[colorAttachment] && frameBuffer->isEnabledColorAttachment(colorAttachment))
{
- gl::Renderbuffer *renderbuffer = frameBuffer->getColorbuffer(colorAttachment);
- if (renderbuffer)
+ gl::FramebufferAttachment *attachment = frameBuffer->getColorbuffer(colorAttachment);
+ if (attachment)
{
- RenderTarget11 *renderTarget = RenderTarget11::makeRenderTarget11(renderbuffer->getRenderTarget());
+ RenderTarget11 *renderTarget = RenderTarget11::makeRenderTarget11(attachment->getRenderTarget());
if (!renderTarget)
{
ERR("Render target pointer unexpectedly null.");
return;
}
- GLenum internalFormat = renderbuffer->getInternalFormat();
- GLenum actualFormat = renderbuffer->getActualFormat();
+ GLenum internalFormat = attachment->getInternalFormat();
+ GLenum actualFormat = attachment->getActualFormat();
GLenum componentType = gl::GetComponentType(internalFormat, clientVersion);
if (clearParams.colorClearType == GL_FLOAT &&
!(componentType == GL_FLOAT || componentType == GL_UNSIGNED_NORMALIZED || componentType == GL_SIGNED_NORMALIZED))
@@ -287,17 +287,17 @@ void Clear11::clearFramebuffer(const gl::ClearParameters &clearParams, gl::Frame
if (clearParams.clearDepth || clearParams.clearStencil)
{
- gl::Renderbuffer *renderbuffer = frameBuffer->getDepthOrStencilbuffer();
- if (renderbuffer)
+ gl::FramebufferAttachment *attachment = frameBuffer->getDepthOrStencilbuffer();
+ if (attachment)
{
- RenderTarget11 *renderTarget = RenderTarget11::makeRenderTarget11(renderbuffer->getDepthStencil());
+ RenderTarget11 *renderTarget = RenderTarget11::makeRenderTarget11(attachment->getDepthStencil());
if (!renderTarget)
{
ERR("Depth stencil render target pointer unexpectedly null.");
return;
}
- GLenum actualFormat = renderbuffer->getActualFormat();
+ GLenum actualFormat = attachment->getActualFormat();
unsigned int stencilUnmasked = frameBuffer->hasStencil() ? (1 << gl::GetStencilBits(actualFormat, clientVersion)) - 1 : 0;
bool needMaskedStencilClear = clearParams.clearStencil && (clearParams.stencilWriteMask & stencilUnmasked) != stencilUnmasked;
diff --git a/src/libGLESv2/renderer/d3d11/Image11.cpp b/src/libGLESv2/renderer/d3d11/Image11.cpp
index 85484f96..aa9260d6 100644
--- a/src/libGLESv2/renderer/d3d11/Image11.cpp
+++ b/src/libGLESv2/renderer/d3d11/Image11.cpp
@@ -213,7 +213,7 @@ void Image11::loadCompressedData(GLint xoffset, GLint yoffset, GLint zoffset, GL
void Image11::copy(GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height, gl::Framebuffer *source)
{
- gl::Renderbuffer *colorbuffer = source->getReadColorbuffer();
+ gl::FramebufferAttachment *colorbuffer = source->getReadColorbuffer();
if (colorbuffer && colorbuffer->getActualFormat() == mActualFormat)
{
diff --git a/src/libGLESv2/renderer/d3d11/RenderStateCache.cpp b/src/libGLESv2/renderer/d3d11/RenderStateCache.cpp
index d0bfd6c8..b58569ad 100644
--- a/src/libGLESv2/renderer/d3d11/RenderStateCache.cpp
+++ b/src/libGLESv2/renderer/d3d11/RenderStateCache.cpp
@@ -93,18 +93,18 @@ ID3D11BlendState *RenderStateCache::getBlendState(const gl::Framebuffer *framebu
key.blendState = blendState;
for (unsigned int i = 0; i < D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT; i++)
{
- gl::Renderbuffer *renderBuffer = framebuffer->getColorbuffer(i);
- if (renderBuffer)
+ gl::FramebufferAttachment *attachment = framebuffer->getColorbuffer(i);
+ if (attachment)
{
if (i > 0)
{
mrt = true;
}
- key.rtChannels[i][0] = renderBuffer->getRedSize() > 0;
- key.rtChannels[i][1] = renderBuffer->getGreenSize() > 0;
- key.rtChannels[i][2] = renderBuffer->getBlueSize() > 0;
- key.rtChannels[i][3] = renderBuffer->getAlphaSize() > 0;
+ key.rtChannels[i][0] = attachment->getRedSize() > 0;
+ key.rtChannels[i][1] = attachment->getGreenSize() > 0;
+ key.rtChannels[i][2] = attachment->getBlueSize() > 0;
+ key.rtChannels[i][3] = attachment->getAlphaSize() > 0;
}
else
{
diff --git a/src/libGLESv2/renderer/d3d11/RenderTarget11.cpp b/src/libGLESv2/renderer/d3d11/RenderTarget11.cpp
index a5c3340e..38c55f3b 100644
--- a/src/libGLESv2/renderer/d3d11/RenderTarget11.cpp
+++ b/src/libGLESv2/renderer/d3d11/RenderTarget11.cpp
@@ -307,9 +307,24 @@ RenderTarget11::RenderTarget11(Renderer *renderer, GLsizei width, GLsizei height
desc.Usage = D3D11_USAGE_DEFAULT;
desc.CPUAccessFlags = 0;
desc.MiscFlags = 0;
- desc.BindFlags = ((srvFormat != DXGI_FORMAT_UNKNOWN) ? D3D11_BIND_SHADER_RESOURCE : 0) |
- ((dsvFormat != DXGI_FORMAT_UNKNOWN) ? D3D11_BIND_DEPTH_STENCIL : 0) |
- ((rtvFormat != DXGI_FORMAT_UNKNOWN) ? D3D11_BIND_RENDER_TARGET : 0);
+
+ // If a rendertarget or depthstencil format exists for this texture format,
+ // we'll flag it to allow binding that way. Shader resource views are a little
+ // more complicated.
+ bool bindRTV = false, bindDSV = false, bindSRV = false;
+ bindRTV = (rtvFormat != DXGI_FORMAT_UNKNOWN);
+ bindDSV = (dsvFormat != DXGI_FORMAT_UNKNOWN);
+ if (srvFormat != DXGI_FORMAT_UNKNOWN)
+ {
+ // Multisample targets flagged for binding as depth stencil cannot also be
+ // flagged for binding as SRV, so make certain not to add the SRV flag for
+ // these targets.
+ bindSRV = !(dsvFormat != DXGI_FORMAT_UNKNOWN && desc.SampleDesc.Count > 1);
+ }
+
+ desc.BindFlags = (bindRTV ? D3D11_BIND_RENDER_TARGET : 0) |
+ (bindDSV ? D3D11_BIND_DEPTH_STENCIL : 0) |
+ (bindSRV ? D3D11_BIND_SHADER_RESOURCE : 0);
ID3D11Device *device = mRenderer->getDevice();
ID3D11Texture2D *texture = NULL;
@@ -323,7 +338,7 @@ RenderTarget11::RenderTarget11(Renderer *renderer, GLsizei width, GLsizei height
}
ASSERT(SUCCEEDED(result));
- if (srvFormat != DXGI_FORMAT_UNKNOWN)
+ if (bindSRV)
{
D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc;
srvDesc.Format = srvFormat;
@@ -341,7 +356,7 @@ RenderTarget11::RenderTarget11(Renderer *renderer, GLsizei width, GLsizei height
ASSERT(SUCCEEDED(result));
}
- if (dsvFormat != DXGI_FORMAT_UNKNOWN)
+ if (bindDSV)
{
D3D11_DEPTH_STENCIL_VIEW_DESC dsvDesc;
dsvDesc.Format = dsvFormat;
@@ -360,7 +375,7 @@ RenderTarget11::RenderTarget11(Renderer *renderer, GLsizei width, GLsizei height
ASSERT(SUCCEEDED(result));
}
- if (rtvFormat != DXGI_FORMAT_UNKNOWN)
+ if (bindRTV)
{
D3D11_RENDER_TARGET_VIEW_DESC rtvDesc;
rtvDesc.Format = rtvFormat;
diff --git a/src/libGLESv2/renderer/d3d11/Renderer11.cpp b/src/libGLESv2/renderer/d3d11/Renderer11.cpp
index 143799ab..c0ad111e 100644
--- a/src/libGLESv2/renderer/d3d11/Renderer11.cpp
+++ b/src/libGLESv2/renderer/d3d11/Renderer11.cpp
@@ -979,7 +979,7 @@ bool Renderer11::applyRenderTarget(gl::Framebuffer *framebuffer)
// the draw buffer must be either "none", "back" for the default buffer or the same index as this color (in order)
ASSERT(drawBufferState == GL_BACK || drawBufferState == (GL_COLOR_ATTACHMENT0_EXT + colorAttachment));
- gl::Renderbuffer *colorbuffer = framebuffer->getColorbuffer(colorAttachment);
+ gl::FramebufferAttachment *colorbuffer = framebuffer->getColorbuffer(colorAttachment);
if (!colorbuffer)
{
@@ -1026,7 +1026,7 @@ bool Renderer11::applyRenderTarget(gl::Framebuffer *framebuffer)
}
// Get the depth stencil render buffer and serials
- gl::Renderbuffer *depthStencil = NULL;
+ gl::FramebufferAttachment *depthStencil = NULL;
unsigned int depthbufferSerial = 0;
unsigned int stencilbufferSerial = 0;
if (framebuffer->getDepthbufferType() != GL_NONE)
@@ -2634,7 +2634,7 @@ bool Renderer11::copyToRenderTarget(TextureStorageInterface2DArray *dest, Textur
bool Renderer11::copyImage(gl::Framebuffer *framebuffer, const gl::Rectangle &sourceRect, GLenum destFormat,
GLint xoffset, GLint yoffset, TextureStorageInterface2D *storage, GLint level)
{
- gl::Renderbuffer *colorbuffer = framebuffer->getReadColorbuffer();
+ gl::FramebufferAttachment *colorbuffer = framebuffer->getReadColorbuffer();
if (!colorbuffer)
{
ERR("Failed to retrieve the color buffer from the frame buffer.");
@@ -2695,7 +2695,7 @@ bool Renderer11::copyImage(gl::Framebuffer *framebuffer, const gl::Rectangle &so
bool Renderer11::copyImage(gl::Framebuffer *framebuffer, const gl::Rectangle &sourceRect, GLenum destFormat,
GLint xoffset, GLint yoffset, TextureStorageInterfaceCube *storage, GLenum target, GLint level)
{
- gl::Renderbuffer *colorbuffer = framebuffer->getReadColorbuffer();
+ gl::FramebufferAttachment *colorbuffer = framebuffer->getReadColorbuffer();
if (!colorbuffer)
{
ERR("Failed to retrieve the color buffer from the frame buffer.");
@@ -2756,7 +2756,7 @@ bool Renderer11::copyImage(gl::Framebuffer *framebuffer, const gl::Rectangle &so
bool Renderer11::copyImage(gl::Framebuffer *framebuffer, const gl::Rectangle &sourceRect, GLenum destFormat,
GLint xoffset, GLint yoffset, GLint zOffset, TextureStorageInterface3D *storage, GLint level)
{
- gl::Renderbuffer *colorbuffer = framebuffer->getReadColorbuffer();
+ gl::FramebufferAttachment *colorbuffer = framebuffer->getReadColorbuffer();
if (!colorbuffer)
{
ERR("Failed to retrieve the color buffer from the frame buffer.");
@@ -2817,7 +2817,7 @@ bool Renderer11::copyImage(gl::Framebuffer *framebuffer, const gl::Rectangle &so
bool Renderer11::copyImage(gl::Framebuffer *framebuffer, const gl::Rectangle &sourceRect, GLenum destFormat,
GLint xoffset, GLint yoffset, GLint zOffset, TextureStorageInterface2DArray *storage, GLint level)
{
- gl::Renderbuffer *colorbuffer = framebuffer->getReadColorbuffer();
+ gl::FramebufferAttachment *colorbuffer = framebuffer->getReadColorbuffer();
if (!colorbuffer)
{
ERR("Failed to retrieve the color buffer from the frame buffer.");
@@ -3169,7 +3169,7 @@ bool Renderer11::fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, uns
return mPixelTransfer->copyBufferToTexture(unpack, offset, destRenderTarget, destinationFormat, sourcePixelsType, destArea);
}
-bool Renderer11::getRenderTargetResource(gl::Renderbuffer *colorbuffer, unsigned int *subresourceIndex, ID3D11Texture2D **resource)
+bool Renderer11::getRenderTargetResource(gl::FramebufferAttachment *colorbuffer, unsigned int *subresourceIndex, ID3D11Texture2D **resource)
{
ASSERT(colorbuffer != NULL);
@@ -3210,7 +3210,7 @@ bool Renderer11::blitRect(gl::Framebuffer *readTarget, const gl::Rectangle &read
{
if (blitRenderTarget)
{
- gl::Renderbuffer *readBuffer = readTarget->getReadColorbuffer();
+ gl::FramebufferAttachment *readBuffer = readTarget->getReadColorbuffer();
if (!readBuffer)
{
@@ -3224,7 +3224,7 @@ bool Renderer11::blitRect(gl::Framebuffer *readTarget, const gl::Rectangle &read
{
if (drawTarget->isEnabledColorAttachment(colorAttachment))
{
- gl::Renderbuffer *drawBuffer = drawTarget->getColorbuffer(colorAttachment);
+ gl::FramebufferAttachment *drawBuffer = drawTarget->getColorbuffer(colorAttachment);
if (!drawBuffer)
{
@@ -3245,8 +3245,8 @@ bool Renderer11::blitRect(gl::Framebuffer *readTarget, const gl::Rectangle &read
if (blitDepth || blitStencil)
{
- gl::Renderbuffer *readBuffer = readTarget->getDepthOrStencilbuffer();
- gl::Renderbuffer *drawBuffer = drawTarget->getDepthOrStencilbuffer();
+ gl::FramebufferAttachment *readBuffer = readTarget->getDepthOrStencilbuffer();
+ gl::FramebufferAttachment *drawBuffer = drawTarget->getDepthOrStencilbuffer();
if (!readBuffer)
{
@@ -3281,7 +3281,7 @@ void Renderer11::readPixels(gl::Framebuffer *framebuffer, GLint x, GLint y, GLsi
ID3D11Texture2D *colorBufferTexture = NULL;
unsigned int subresourceIndex = 0;
- gl::Renderbuffer *colorbuffer = framebuffer->getReadColorbuffer();
+ gl::FramebufferAttachment *colorbuffer = framebuffer->getReadColorbuffer();
if (colorbuffer && getRenderTargetResource(colorbuffer, &subresourceIndex, &colorBufferTexture))
{
@@ -3749,9 +3749,10 @@ ID3D11Texture2D *Renderer11::resolveMultisampledTexture(ID3D11Texture2D *source,
}
}
-void Renderer11::invalidateRenderbufferSwizzles(gl::Renderbuffer *renderBuffer, int mipLevel)
+void Renderer11::invalidateFBOAttachmentSwizzles(gl::FramebufferAttachment *attachment, int mipLevel)
{
- TextureStorage *texStorage = renderBuffer->getTextureStorage();
+ ASSERT(attachment->isTexture());
+ TextureStorage *texStorage = attachment->getTextureStorage();
if (texStorage)
{
TextureStorage11 *texStorage11 = TextureStorage11::makeTextureStorage11(texStorage);
@@ -3769,23 +3770,23 @@ void Renderer11::invalidateFramebufferSwizzles(gl::Framebuffer *framebuffer)
{
for (unsigned int colorAttachment = 0; colorAttachment < gl::IMPLEMENTATION_MAX_DRAW_BUFFERS; colorAttachment++)
{
- gl::Renderbuffer *colorbuffer = framebuffer->getColorbuffer(colorAttachment);
- if (colorbuffer)
+ gl::FramebufferAttachment *attachment = framebuffer->getColorbuffer(colorAttachment);
+ if (attachment && attachment->isTexture())
{
- invalidateRenderbufferSwizzles(colorbuffer, framebuffer->getColorbufferMipLevel(colorAttachment));
+ invalidateFBOAttachmentSwizzles(attachment, framebuffer->getColorbufferMipLevel(colorAttachment));
}
}
- gl::Renderbuffer *depthBuffer = framebuffer->getDepthbuffer();
- if (depthBuffer)
+ gl::FramebufferAttachment *depthAttachment = framebuffer->getDepthbuffer();
+ if (depthAttachment && depthAttachment->isTexture())
{
- invalidateRenderbufferSwizzles(depthBuffer, framebuffer->getDepthbufferMipLevel());
+ invalidateFBOAttachmentSwizzles(depthAttachment, framebuffer->getDepthbufferMipLevel());
}
- gl::Renderbuffer *stencilBuffer = framebuffer->getStencilbuffer();
- if (stencilBuffer)
+ gl::FramebufferAttachment *stencilAttachment = framebuffer->getStencilbuffer();
+ if (stencilAttachment && stencilAttachment->isTexture())
{
- invalidateRenderbufferSwizzles(stencilBuffer, framebuffer->getStencilbufferMipLevel());
+ invalidateFBOAttachmentSwizzles(stencilAttachment, framebuffer->getStencilbufferMipLevel());
}
}
diff --git a/src/libGLESv2/renderer/d3d11/Renderer11.h b/src/libGLESv2/renderer/d3d11/Renderer11.h
index 3e6a54a2..bbd0de49 100644
--- a/src/libGLESv2/renderer/d3d11/Renderer11.h
+++ b/src/libGLESv2/renderer/d3d11/Renderer11.h
@@ -21,7 +21,7 @@
namespace gl
{
-class Renderbuffer;
+class FramebufferAttachment;
}
namespace rx
@@ -229,7 +229,7 @@ class Renderer11 : public Renderer
virtual bool fastCopyBufferToTexture(const gl::PixelUnpackState &unpack, unsigned int offset, RenderTarget *destRenderTarget,
GLenum destinationFormat, GLenum sourcePixelsType, const gl::Box &destArea);
- bool getRenderTargetResource(gl::Renderbuffer *colorbuffer, unsigned int *subresourceIndex, ID3D11Texture2D **resource);
+ bool getRenderTargetResource(gl::FramebufferAttachment *colorbuffer, unsigned int *subresourceIndex, ID3D11Texture2D **resource);
void unapplyRenderTargets();
void setOneTimeRenderTarget(ID3D11RenderTargetView *renderTargetView);
void packPixels(ID3D11Texture2D *readTexture, const PackPixelsParams &params, void *pixelsOut);
@@ -255,7 +255,7 @@ class Renderer11 : public Renderer
bool colorBlit, bool depthBlit, bool stencilBlit);
ID3D11Texture2D *resolveMultisampledTexture(ID3D11Texture2D *source, unsigned int subresource);
- static void invalidateRenderbufferSwizzles(gl::Renderbuffer *renderBuffer, int mipLevel);
+ static void invalidateFBOAttachmentSwizzles(gl::FramebufferAttachment *attachment, int mipLevel);
static void invalidateFramebufferSwizzles(gl::Framebuffer *framebuffer);
HMODULE mD3d11Module;
diff --git a/src/libGLESv2/renderer/d3d9/Blit9.cpp b/src/libGLESv2/renderer/d3d9/Blit9.cpp
index a8485bd7..80a4375c 100644
--- a/src/libGLESv2/renderer/d3d9/Blit9.cpp
+++ b/src/libGLESv2/renderer/d3d9/Blit9.cpp
@@ -213,7 +213,7 @@ bool Blit9::copy(gl::Framebuffer *framebuffer, const RECT &sourceRect, GLenum de
{
RenderTarget9 *renderTarget = NULL;
IDirect3DSurface9 *source = NULL;
- gl::Renderbuffer *colorbuffer = framebuffer->getColorbuffer(0);
+ gl::FramebufferAttachment *colorbuffer = framebuffer->getColorbuffer(0);
if (colorbuffer)
{
@@ -249,7 +249,7 @@ bool Blit9::copy(gl::Framebuffer *framebuffer, const RECT &sourceRect, GLenum de
{
RenderTarget9 *renderTarget = NULL;
IDirect3DSurface9 *source = NULL;
- gl::Renderbuffer *colorbuffer = framebuffer->getColorbuffer(0);
+ gl::FramebufferAttachment *colorbuffer = framebuffer->getColorbuffer(0);
if (colorbuffer)
{
diff --git a/src/libGLESv2/renderer/d3d9/Image9.cpp b/src/libGLESv2/renderer/d3d9/Image9.cpp
index 7ddf957c..001858e9 100644
--- a/src/libGLESv2/renderer/d3d9/Image9.cpp
+++ b/src/libGLESv2/renderer/d3d9/Image9.cpp
@@ -452,7 +452,7 @@ void Image9::copy(GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y,
RenderTarget9 *renderTarget = NULL;
IDirect3DSurface9 *surface = NULL;
- gl::Renderbuffer *colorbuffer = source->getColorbuffer(0);
+ gl::FramebufferAttachment *colorbuffer = source->getColorbuffer(0);
if (colorbuffer)
{
diff --git a/src/libGLESv2/renderer/d3d9/Renderer9.cpp b/src/libGLESv2/renderer/d3d9/Renderer9.cpp
index 76fdfdcc..7d6dd7a6 100644
--- a/src/libGLESv2/renderer/d3d9/Renderer9.cpp
+++ b/src/libGLESv2/renderer/d3d9/Renderer9.cpp
@@ -930,8 +930,8 @@ void Renderer9::setBlendState(gl::Framebuffer *framebuffer, const gl::BlendState
FIXME("Sample alpha to coverage is unimplemented.");
}
- gl::Renderbuffer *renderBuffer = framebuffer->getFirstColorbuffer();
- GLenum internalFormat = renderBuffer ? renderBuffer->getInternalFormat() : GL_NONE;
+ gl::FramebufferAttachment *attachment = framebuffer->getFirstColorbuffer();
+ GLenum internalFormat = attachment ? attachment->getInternalFormat() : GL_NONE;
GLuint clientVersion = getCurrentClientVersion();
// Set the color mask
@@ -1225,7 +1225,7 @@ bool Renderer9::applyPrimitiveType(GLenum mode, GLsizei count)
}
-gl::Renderbuffer *Renderer9::getNullColorbuffer(gl::Renderbuffer *depthbuffer)
+gl::FramebufferAttachment *Renderer9::getNullColorbuffer(gl::FramebufferAttachment *depthbuffer)
{
if (!depthbuffer)
{
@@ -1248,7 +1248,7 @@ gl::Renderbuffer *Renderer9::getNullColorbuffer(gl::Renderbuffer *depthbuffer)
}
}
- gl::Renderbuffer *nullbuffer = new gl::Renderbuffer(this, 0, new gl::Colorbuffer(this, width, height, GL_NONE, 0));
+ gl::FramebufferAttachment *nullbuffer = new gl::FramebufferAttachment(this, 0, new gl::Colorbuffer(this, width, height, GL_NONE, 0));
// add nullbuffer to the cache
NullColorbufferCacheEntry *oldest = &mNullColorbufferCache[0];
@@ -1273,7 +1273,7 @@ bool Renderer9::applyRenderTarget(gl::Framebuffer *framebuffer)
{
// if there is no color attachment we must synthesize a NULL colorattachment
// to keep the D3D runtime happy. This should only be possible if depth texturing.
- gl::Renderbuffer *renderbufferObject = NULL;
+ gl::FramebufferAttachment *renderbufferObject = NULL;
if (framebuffer->getColorbufferType(0) != GL_NONE)
{
renderbufferObject = framebuffer->getColorbuffer(0);
@@ -1314,7 +1314,7 @@ bool Renderer9::applyRenderTarget(gl::Framebuffer *framebuffer)
renderTargetChanged = true;
}
- gl::Renderbuffer *depthStencil = NULL;
+ gl::FramebufferAttachment *depthStencil = NULL;
unsigned int depthbufferSerial = 0;
unsigned int stencilbufferSerial = 0;
if (framebuffer->getDepthbufferType() != GL_NONE)
@@ -1902,9 +1902,9 @@ void Renderer9::clear(const gl::ClearParameters &clearParams, gl::Framebuffer *f
D3DCOLOR color = D3DCOLOR_ARGB(255, 0, 0, 0);
if (clearColor)
{
- gl::Renderbuffer *renderbuffer = frameBuffer->getFirstColorbuffer();
- GLenum internalFormat = renderbuffer->getInternalFormat();
- GLenum actualFormat = renderbuffer->getActualFormat();
+ gl::FramebufferAttachment *attachment = frameBuffer->getFirstColorbuffer();
+ GLenum internalFormat = attachment->getInternalFormat();
+ GLenum actualFormat = attachment->getActualFormat();
GLuint clientVersion = getCurrentClientVersion();
GLuint internalRedBits = gl::GetRedBits(internalFormat, clientVersion);
@@ -2935,8 +2935,8 @@ bool Renderer9::blitRect(gl::Framebuffer *readFramebuffer, const gl::Rectangle &
if (blitRenderTarget)
{
- gl::Renderbuffer *readBuffer = readFramebuffer->getColorbuffer(0);
- gl::Renderbuffer *drawBuffer = drawFramebuffer->getColorbuffer(0);
+ gl::FramebufferAttachment *readBuffer = readFramebuffer->getColorbuffer(0);
+ gl::FramebufferAttachment *drawBuffer = drawFramebuffer->getColorbuffer(0);
RenderTarget9 *readRenderTarget = NULL;
RenderTarget9 *drawRenderTarget = NULL;
IDirect3DSurface9* readSurface = NULL;
@@ -3064,8 +3064,8 @@ bool Renderer9::blitRect(gl::Framebuffer *readFramebuffer, const gl::Rectangle &
if (blitDepth || blitStencil)
{
- gl::Renderbuffer *readBuffer = readFramebuffer->getDepthOrStencilbuffer();
- gl::Renderbuffer *drawBuffer = drawFramebuffer->getDepthOrStencilbuffer();
+ gl::FramebufferAttachment *readBuffer = readFramebuffer->getDepthOrStencilbuffer();
+ gl::FramebufferAttachment *drawBuffer = drawFramebuffer->getDepthOrStencilbuffer();
RenderTarget9 *readDepthStencil = NULL;
RenderTarget9 *drawDepthStencil = NULL;
IDirect3DSurface9* readSurface = NULL;
@@ -3117,7 +3117,7 @@ void Renderer9::readPixels(gl::Framebuffer *framebuffer, GLint x, GLint y, GLsiz
RenderTarget9 *renderTarget = NULL;
IDirect3DSurface9 *surface = NULL;
- gl::Renderbuffer *colorbuffer = framebuffer->getColorbuffer(0);
+ gl::FramebufferAttachment *colorbuffer = framebuffer->getColorbuffer(0);
if (colorbuffer)
{
diff --git a/src/libGLESv2/renderer/d3d9/Renderer9.h b/src/libGLESv2/renderer/d3d9/Renderer9.h
index 8f723e3c..d3ea314f 100644
--- a/src/libGLESv2/renderer/d3d9/Renderer9.h
+++ b/src/libGLESv2/renderer/d3d9/Renderer9.h
@@ -19,7 +19,7 @@
namespace gl
{
-class Renderbuffer;
+class FramebufferAttachment;
}
namespace rx
@@ -249,7 +249,7 @@ class Renderer9 : public Renderer
void drawIndexedPoints(GLsizei count, GLenum type, const GLvoid *indices, int minIndex, gl::Buffer *elementArrayBuffer);
bool copyToRenderTarget(IDirect3DSurface9 *dest, IDirect3DSurface9 *source, bool fromManaged);
- gl::Renderbuffer *getNullColorbuffer(gl::Renderbuffer *depthbuffer);
+ gl::FramebufferAttachment *getNullColorbuffer(gl::FramebufferAttachment *depthbuffer);
D3DPOOL getBufferPool(DWORD usage) const;
@@ -401,7 +401,7 @@ class Renderer9 : public Renderer
UINT lruCount;
int width;
int height;
- gl::Renderbuffer *buffer;
+ gl::FramebufferAttachment *buffer;
} mNullColorbufferCache[NUM_NULL_COLORBUFFER_CACHE_ENTRIES];
UINT mMaxNullColorbufferLRU;
diff --git a/src/libGLESv2/validationES.cpp b/src/libGLESv2/validationES.cpp
index a6ae90a2..e44a0f75 100644
--- a/src/libGLESv2/validationES.cpp
+++ b/src/libGLESv2/validationES.cpp
@@ -67,6 +67,7 @@ bool ValidTextureTarget(const Context *context, GLenum target)
// This function differs from ValidTextureTarget in that the target must be
// usable as the destination of a 2D operation-- so a cube face is valid, but
// GL_TEXTURE_CUBE_MAP is not.
+// Note: duplicate of IsInternalTextureTarget
bool ValidTexture2DDestinationTarget(const Context *context, GLenum target)
{
switch (target)
@@ -374,7 +375,7 @@ bool ValidateFramebufferRenderbufferParameters(gl::Context *context, GLenum targ
return true;
}
-static bool IsPartialBlit(gl::Context *context, gl::Renderbuffer *readBuffer, gl::Renderbuffer *writeBuffer,
+static bool IsPartialBlit(gl::Context *context, gl::FramebufferAttachment *readBuffer, gl::FramebufferAttachment *writeBuffer,
GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1)
{
@@ -471,8 +472,8 @@ bool ValidateBlitFramebufferParameters(gl::Context *context, GLint srcX0, GLint
if (mask & GL_COLOR_BUFFER_BIT)
{
- gl::Renderbuffer *readColorBuffer = readFramebuffer->getReadColorbuffer();
- gl::Renderbuffer *drawColorBuffer = drawFramebuffer->getFirstColorbuffer();
+ gl::FramebufferAttachment *readColorBuffer = readFramebuffer->getReadColorbuffer();
+ gl::FramebufferAttachment *drawColorBuffer = drawFramebuffer->getFirstColorbuffer();
if (readColorBuffer && drawColorBuffer)
{
@@ -554,8 +555,8 @@ bool ValidateBlitFramebufferParameters(gl::Context *context, GLint srcX0, GLint
if (mask & GL_DEPTH_BUFFER_BIT)
{
- gl::Renderbuffer *readDepthBuffer = readFramebuffer->getDepthbuffer();
- gl::Renderbuffer *drawDepthBuffer = drawFramebuffer->getDepthbuffer();
+ gl::FramebufferAttachment *readDepthBuffer = readFramebuffer->getDepthbuffer();
+ gl::FramebufferAttachment *drawDepthBuffer = drawFramebuffer->getDepthbuffer();
if (readDepthBuffer && drawDepthBuffer)
{
@@ -588,8 +589,8 @@ bool ValidateBlitFramebufferParameters(gl::Context *context, GLint srcX0, GLint
if (mask & GL_STENCIL_BUFFER_BIT)
{
- gl::Renderbuffer *readStencilBuffer = readFramebuffer->getStencilbuffer();
- gl::Renderbuffer *drawStencilBuffer = drawFramebuffer->getStencilbuffer();
+ gl::FramebufferAttachment *readStencilBuffer = readFramebuffer->getStencilbuffer();
+ gl::FramebufferAttachment *drawStencilBuffer = drawFramebuffer->getStencilbuffer();
if (readStencilBuffer && drawStencilBuffer)
{
@@ -1077,8 +1078,8 @@ bool ValidateStateQuery(gl::Context *context, GLenum pname, GLenum *nativeType,
return gl::error(GL_INVALID_OPERATION, false);
}
- Renderbuffer *renderbuffer = framebuffer->getReadColorbuffer();
- if (!renderbuffer)
+ FramebufferAttachment *attachment = framebuffer->getReadColorbuffer();
+ if (!attachment)
{
return gl::error(GL_INVALID_OPERATION, false);
}
@@ -1098,4 +1099,193 @@ bool ValidateStateQuery(gl::Context *context, GLenum pname, GLenum *nativeType,
return true;
}
+bool ValidateCopyTexImageParametersBase(gl::Context* context, GLenum target, GLint level, GLenum internalformat, bool isSubImage,
+ GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height,
+ GLint border, GLenum *textureFormatOut)
+{
+
+ if (!ValidTexture2DDestinationTarget(context, target))
+ {
+ return gl::error(GL_INVALID_ENUM, false);
+ }
+
+ if (level < 0 || xoffset < 0 || yoffset < 0 || zoffset < 0 || width < 0 || height < 0)
+ {
+ return gl::error(GL_INVALID_VALUE, false);
+ }
+
+ if (std::numeric_limits<GLsizei>::max() - xoffset < width || std::numeric_limits<GLsizei>::max() - yoffset < height)
+ {
+ return gl::error(GL_INVALID_VALUE, false);
+ }
+
+ if (border != 0)
+ {
+ return gl::error(GL_INVALID_VALUE, false);
+ }
+
+ if (!ValidMipLevel(context, target, level))
+ {
+ return gl::error(GL_INVALID_VALUE, false);
+ }
+
+ gl::Framebuffer *framebuffer = context->getReadFramebuffer();
+ if (framebuffer->completeness() != GL_FRAMEBUFFER_COMPLETE)
+ {
+ return gl::error(GL_INVALID_FRAMEBUFFER_OPERATION, false);
+ }
+
+ if (context->getReadFramebufferHandle() != 0 && framebuffer->getSamples() != 0)
+ {
+ return gl::error(GL_INVALID_OPERATION, false);
+ }
+
+ gl::Texture *texture = NULL;
+ GLenum textureInternalFormat = GL_NONE;
+ bool textureCompressed = false;
+ bool textureIsDepth = false;
+ GLint textureLevelWidth = 0;
+ GLint textureLevelHeight = 0;
+ GLint textureLevelDepth = 0;
+ int maxDimension = 0;
+
+ switch (target)
+ {
+ case GL_TEXTURE_2D:
+ {
+ gl::Texture2D *texture2d = context->getTexture2D();
+ if (texture2d)
+ {
+ textureInternalFormat = texture2d->getInternalFormat(level);
+ textureCompressed = texture2d->isCompressed(level);
+ textureIsDepth = texture2d->isDepth(level);
+ textureLevelWidth = texture2d->getWidth(level);
+ textureLevelHeight = texture2d->getHeight(level);
+ textureLevelDepth = 1;
+ texture = texture2d;
+ maxDimension = context->getMaximum2DTextureDimension();
+ }
+ }
+ break;
+
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
+ {
+ gl::TextureCubeMap *textureCube = context->getTextureCubeMap();
+ if (textureCube)
+ {
+ textureInternalFormat = textureCube->getInternalFormat(target, level);
+ textureCompressed = textureCube->isCompressed(target, level);
+ textureIsDepth = false;
+ textureLevelWidth = textureCube->getWidth(target, level);
+ textureLevelHeight = textureCube->getHeight(target, level);
+ textureLevelDepth = 1;
+ texture = textureCube;
+ maxDimension = context->getMaximumCubeTextureDimension();
+ }
+ }
+ break;
+
+ case GL_TEXTURE_2D_ARRAY:
+ {
+ gl::Texture2DArray *texture2dArray = context->getTexture2DArray();
+ if (texture2dArray)
+ {
+ textureInternalFormat = texture2dArray->getInternalFormat(level);
+ textureCompressed = texture2dArray->isCompressed(level);
+ textureIsDepth = texture2dArray->isDepth(level);
+ textureLevelWidth = texture2dArray->getWidth(level);
+ textureLevelHeight = texture2dArray->getHeight(level);
+ textureLevelDepth = texture2dArray->getLayers(level);
+ texture = texture2dArray;
+ maxDimension = context->getMaximum2DTextureDimension();
+ }
+ }
+ break;
+
+ case GL_TEXTURE_3D:
+ {
+ gl::Texture3D *texture3d = context->getTexture3D();
+ if (texture3d)
+ {
+ textureInternalFormat = texture3d->getInternalFormat(level);
+ textureCompressed = texture3d->isCompressed(level);
+ textureIsDepth = texture3d->isDepth(level);
+ textureLevelWidth = texture3d->getWidth(level);
+ textureLevelHeight = texture3d->getHeight(level);
+ textureLevelDepth = texture3d->getDepth(level);
+ texture = texture3d;
+ maxDimension = context->getMaximum3DTextureDimension();
+ }
+ }
+ break;
+
+ default:
+ return gl::error(GL_INVALID_ENUM, false);
+ }
+
+ if (!texture)
+ {
+ return gl::error(GL_INVALID_OPERATION, false);
+ }
+
+ if (texture->isImmutable() && !isSubImage)
+ {
+ return gl::error(GL_INVALID_OPERATION, false);
+ }
+
+ if (textureIsDepth)
+ {
+ return gl::error(GL_INVALID_OPERATION, false);
+ }
+
+ if (textureCompressed)
+ {
+ int clientVersion = context->getClientVersion();
+ GLint blockWidth = GetCompressedBlockWidth(textureInternalFormat, clientVersion);
+ GLint blockHeight = GetCompressedBlockHeight(textureInternalFormat, clientVersion);
+
+ if (((width % blockWidth) != 0 && width != textureLevelWidth) ||
+ ((height % blockHeight) != 0 && height != textureLevelHeight))
+ {
+ return gl::error(GL_INVALID_OPERATION, false);
+ }
+ }
+
+ if (isSubImage)
+ {
+ if (xoffset + width > textureLevelWidth ||
+ yoffset + height > textureLevelHeight ||
+ zoffset >= textureLevelDepth)
+ {
+ return gl::error(GL_INVALID_VALUE, false);
+ }
+ }
+ else
+ {
+ if (IsCubemapTextureTarget(target) && width != height)
+ {
+ return gl::error(GL_INVALID_VALUE, false);
+ }
+
+ if (!IsValidInternalFormat(internalformat, context))
+ {
+ return gl::error(GL_INVALID_ENUM, false);
+ }
+
+ int maxLevelDimension = (maxDimension >> level);
+ if (static_cast<int>(width) > maxLevelDimension || static_cast<int>(height) > maxLevelDimension)
+ {
+ return gl::error(GL_INVALID_VALUE, false);
+ }
+ }
+
+ *textureFormatOut = textureInternalFormat;
+ return true;
+}
+
}
diff --git a/src/libGLESv2/validationES.h b/src/libGLESv2/validationES.h
index a61313ee..2bce2d75 100644
--- a/src/libGLESv2/validationES.h
+++ b/src/libGLESv2/validationES.h
@@ -54,6 +54,10 @@ bool ValidateUniformMatrix(gl::Context *context, GLenum matrixType, GLint locati
bool ValidateStateQuery(gl::Context *context, GLenum pname, GLenum *nativeType, unsigned int *numParams);
+bool ValidateCopyTexImageParametersBase(gl::Context* context, GLenum target, GLint level, GLenum internalformat, bool isSubImage,
+ GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height,
+ GLint border, GLenum *textureInternalFormatOut);
+
}
#endif // LIBGLESV2_VALIDATION_ES_H
diff --git a/src/libGLESv2/validationES2.cpp b/src/libGLESv2/validationES2.cpp
index 428d1385..a0ef855e 100644
--- a/src/libGLESv2/validationES2.cpp
+++ b/src/libGLESv2/validationES2.cpp
@@ -108,6 +108,11 @@ bool ValidateES2TexImageParameters(gl::Context *context, GLenum target, GLint le
GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
GLint border, GLenum format, GLenum type, const GLvoid *pixels)
{
+ if (!ValidTexture2DDestinationTarget(context, target))
+ {
+ return gl::error(GL_INVALID_ENUM, false);
+ }
+
if (!ValidImageSize(context, target, level, width, height, 1))
{
return gl::error(GL_INVALID_VALUE, false);
@@ -457,122 +462,17 @@ bool ValidateES2CopyTexImageParameters(gl::Context* context, GLenum target, GLin
GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height,
GLint border)
{
- if (!ValidTexture2DDestinationTarget(context, target))
- {
- return gl::error(GL_INVALID_ENUM, false);
- }
-
- if (!gl::IsInternalTextureTarget(target, context->getClientVersion()))
- {
- return gl::error(GL_INVALID_ENUM, false);
- }
-
- if (level < 0 || xoffset < 0 || yoffset < 0 || width < 0 || height < 0)
- {
- return gl::error(GL_INVALID_VALUE, false);
- }
-
- if (std::numeric_limits<GLsizei>::max() - xoffset < width || std::numeric_limits<GLsizei>::max() - yoffset < height)
- {
- return gl::error(GL_INVALID_VALUE, false);
- }
-
- // Verify zero border
- if (border != 0)
- {
- return gl::error(GL_INVALID_VALUE, false);
- }
+ GLenum textureInternalFormat = GL_NONE;
- // Validate dimensions based on Context limits and validate the texture
- if (!ValidMipLevel(context, target, level))
+ if (!ValidateCopyTexImageParametersBase(context, target, level, internalformat, isSubImage,
+ xoffset, yoffset, 0, x, y, width, height, border, &textureInternalFormat))
{
- return gl::error(GL_INVALID_VALUE, false);
+ return false;
}
gl::Framebuffer *framebuffer = context->getReadFramebuffer();
-
- if (framebuffer->completeness() != GL_FRAMEBUFFER_COMPLETE)
- {
- return gl::error(GL_INVALID_FRAMEBUFFER_OPERATION, false);
- }
-
- if (context->getReadFramebufferHandle() != 0 && framebuffer->getSamples() != 0)
- {
- return gl::error(GL_INVALID_OPERATION, false);
- }
-
GLenum colorbufferFormat = framebuffer->getReadColorbuffer()->getInternalFormat();
- gl::Texture *texture = NULL;
- GLenum textureFormat = GL_RGBA;
-
- switch (target)
- {
- case GL_TEXTURE_2D:
- {
- if (width > (context->getMaximum2DTextureDimension() >> level) ||
- height > (context->getMaximum2DTextureDimension() >> level))
- {
- return gl::error(GL_INVALID_VALUE, false);
- }
-
- gl::Texture2D *tex2d = context->getTexture2D();
- if (tex2d)
- {
- if (isSubImage && !validateSubImageParams2D(false, width, height, xoffset, yoffset, level, GL_NONE, GL_NONE, tex2d))
- {
- return false; // error already registered by validateSubImageParams
- }
- texture = tex2d;
- textureFormat = gl::GetFormat(tex2d->getInternalFormat(level), context->getClientVersion());
- }
- }
- break;
-
- case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
- {
- if (!isSubImage && width != height)
- {
- return gl::error(GL_INVALID_VALUE, false);
- }
-
- if (width > (context->getMaximumCubeTextureDimension() >> level) ||
- height > (context->getMaximumCubeTextureDimension() >> level))
- {
- return gl::error(GL_INVALID_VALUE, false);
- }
-
- gl::TextureCubeMap *texcube = context->getTextureCubeMap();
- if (texcube)
- {
- if (isSubImage && !validateSubImageParamsCube(false, width, height, xoffset, yoffset, target, level, GL_NONE, GL_NONE, texcube))
- {
- return false; // error already registered by validateSubImageParams
- }
- texture = texcube;
- textureFormat = gl::GetFormat(texcube->getInternalFormat(target, level), context->getClientVersion());
- }
- }
- break;
-
- default:
- return gl::error(GL_INVALID_ENUM, false);
- }
-
- if (!texture)
- {
- return gl::error(GL_INVALID_OPERATION, false);
- }
-
- if (texture->isImmutable() && !isSubImage)
- {
- return gl::error(GL_INVALID_OPERATION, false);
- }
-
+ GLenum textureFormat = gl::GetFormat(textureInternalFormat, context->getClientVersion());
// [OpenGL ES 2.0.24] table 3.9
if (isSubImage)
diff --git a/src/libGLESv2/validationES3.cpp b/src/libGLESv2/validationES3.cpp
index ad1bde78..a45a5a31 100644
--- a/src/libGLESv2/validationES3.cpp
+++ b/src/libGLESv2/validationES3.cpp
@@ -25,6 +25,11 @@ bool ValidateES3TexImageParameters(gl::Context *context, GLenum target, GLint le
GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth,
GLint border, GLenum format, GLenum type, const GLvoid *pixels)
{
+ if (!ValidTexture2DDestinationTarget(context, target))
+ {
+ return gl::error(GL_INVALID_ENUM, false);
+ }
+
// Validate image size
if (!ValidImageSize(context, target, level, width, height, depth))
{
@@ -37,6 +42,14 @@ bool ValidateES3TexImageParameters(gl::Context *context, GLenum target, GLint le
return gl::error(GL_INVALID_VALUE, false);
}
+ if (xoffset < 0 || yoffset < 0 || zoffset < 0 ||
+ std::numeric_limits<GLsizei>::max() - xoffset < width ||
+ std::numeric_limits<GLsizei>::max() - yoffset < height ||
+ std::numeric_limits<GLsizei>::max() - zoffset < depth)
+ {
+ return gl::error(GL_INVALID_VALUE, false);
+ }
+
gl::Texture *texture = NULL;
bool textureCompressed = false;
GLenum textureInternalFormat = GL_NONE;
@@ -156,6 +169,7 @@ bool ValidateES3TexImageParameters(gl::Context *context, GLenum target, GLint le
// Validate texture formats
GLenum actualInternalFormat = isSubImage ? textureInternalFormat : internalformat;
+ int clientVersion = context->getClientVersion();
if (isCompressed)
{
if (!ValidCompressedImageSize(context, actualInternalFormat, width, height))
@@ -163,7 +177,7 @@ bool ValidateES3TexImageParameters(gl::Context *context, GLenum target, GLint le
return gl::error(GL_INVALID_OPERATION, false);
}
- if (!gl::IsFormatCompressed(actualInternalFormat, context->getClientVersion()))
+ if (!gl::IsFormatCompressed(actualInternalFormat, clientVersion))
{
return gl::error(GL_INVALID_ENUM, false);
}
@@ -175,14 +189,16 @@ bool ValidateES3TexImageParameters(gl::Context *context, GLenum target, GLint le
}
else
{
+ // Note: dEQP 2013.4 expects an INVALID_VALUE error for TexImage3D with an invalid
+ // internal format. (dEQP-GLES3.functional.negative_api.texture.teximage3d)
if (!gl::IsValidInternalFormat(actualInternalFormat, context) ||
- !gl::IsValidFormat(format, context->getClientVersion()) ||
- !gl::IsValidType(type, context->getClientVersion()))
+ !gl::IsValidFormat(format, clientVersion) ||
+ !gl::IsValidType(type, clientVersion))
{
return gl::error(GL_INVALID_ENUM, false);
}
- if (!gl::IsValidFormatCombination(actualInternalFormat, format, type, context->getClientVersion()))
+ if (!gl::IsValidFormatCombination(actualInternalFormat, format, type, clientVersion))
{
return gl::error(GL_INVALID_OPERATION, false);
}
@@ -244,7 +260,11 @@ bool ValidateES3TexImageParameters(gl::Context *context, GLenum target, GLint le
size_t widthSize = static_cast<size_t>(width);
size_t heightSize = static_cast<size_t>(height);
size_t depthSize = static_cast<size_t>(depth);
- size_t pixelBytes = static_cast<size_t>(gl::GetPixelBytes(actualInternalFormat, context->getClientVersion()));
+ GLenum sizedFormat = gl::IsSizedInternalFormat(actualInternalFormat, clientVersion) ?
+ actualInternalFormat :
+ gl::GetSizedInternalFormat(actualInternalFormat, type, clientVersion);
+
+ size_t pixelBytes = static_cast<size_t>(gl::GetPixelBytes(sizedFormat, clientVersion));
if (!rx::IsUnsignedMultiplicationSafe(widthSize, heightSize) ||
!rx::IsUnsignedMultiplicationSafe(widthSize * heightSize, depthSize) ||
@@ -257,7 +277,8 @@ bool ValidateES3TexImageParameters(gl::Context *context, GLenum target, GLint le
size_t copyBytes = widthSize * heightSize * depthSize * pixelBytes;
size_t offset = reinterpret_cast<size_t>(pixels);
- if (!rx::IsUnsignedAdditionSafe(offset, copyBytes) || ((offset + copyBytes) > static_cast<size_t>(pixelUnpackBuffer->size())))
+ if (!rx::IsUnsignedAdditionSafe(offset, copyBytes) ||
+ ((offset + copyBytes) > static_cast<size_t>(pixelUnpackBuffer->size())))
{
// Overflow past the end of the buffer
return gl::error(GL_INVALID_OPERATION, false);
@@ -283,32 +304,15 @@ bool ValidateES3TexImageParameters(gl::Context *context, GLenum target, GLint le
}
bool ValidateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLint level, GLenum internalformat,
- bool isSubImage, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y,
- GLsizei width, GLsizei height, GLint border)
+ bool isSubImage, GLint xoffset, GLint yoffset, GLint zoffset,
+ GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
{
- if (!ValidTexture2DDestinationTarget(context, target))
- {
- return gl::error(GL_INVALID_ENUM, false);
- }
-
- if (level < 0 || xoffset < 0 || yoffset < 0 || zoffset < 0 || width < 0 || height < 0)
- {
- return gl::error(GL_INVALID_VALUE, false);
- }
-
- if (std::numeric_limits<GLsizei>::max() - xoffset < width || std::numeric_limits<GLsizei>::max() - yoffset < height)
- {
- return gl::error(GL_INVALID_VALUE, false);
- }
-
- if (border != 0)
+ GLenum textureInternalFormat;
+ if (!ValidateCopyTexImageParametersBase(context, target, level, internalformat, isSubImage,
+ xoffset, yoffset, zoffset, x, y, width, height,
+ border, &textureInternalFormat))
{
- return gl::error(GL_INVALID_VALUE, false);
- }
-
- if (!ValidMipLevel(context, target, level))
- {
- return gl::error(GL_INVALID_VALUE, false);
+ return false;
}
gl::Framebuffer *framebuffer = context->getReadFramebuffer();
@@ -323,124 +327,13 @@ bool ValidateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
return gl::error(GL_INVALID_OPERATION, false);
}
- gl::Renderbuffer *source = framebuffer->getReadColorbuffer();
+ gl::FramebufferAttachment *source = framebuffer->getReadColorbuffer();
GLenum colorbufferInternalFormat = source->getInternalFormat();
- gl::Texture *texture = NULL;
- GLenum textureInternalFormat = GL_NONE;
- bool textureCompressed = false;
- bool textureIsDepth = false;
- GLint textureLevelWidth = 0;
- GLint textureLevelHeight = 0;
- GLint textureLevelDepth = 0;
- switch (target)
- {
- case GL_TEXTURE_2D:
- {
- gl::Texture2D *texture2d = context->getTexture2D();
- if (texture2d)
- {
- textureInternalFormat = texture2d->getInternalFormat(level);
- textureCompressed = texture2d->isCompressed(level);
- textureIsDepth = texture2d->isDepth(level);
- textureLevelWidth = texture2d->getWidth(level);
- textureLevelHeight = texture2d->getHeight(level);
- textureLevelDepth = 1;
- texture = texture2d;
- }
- }
- break;
-
- case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
- {
- gl::TextureCubeMap *textureCube = context->getTextureCubeMap();
- if (textureCube)
- {
- textureInternalFormat = textureCube->getInternalFormat(target, level);
- textureCompressed = textureCube->isCompressed(target, level);
- textureIsDepth = false;
- textureLevelWidth = textureCube->getWidth(target, level);
- textureLevelHeight = textureCube->getHeight(target, level);
- textureLevelDepth = 1;
- texture = textureCube;
- }
- }
- break;
-
- case GL_TEXTURE_2D_ARRAY:
- {
- gl::Texture2DArray *texture2dArray = context->getTexture2DArray();
- if (texture2dArray)
- {
- textureInternalFormat = texture2dArray->getInternalFormat(level);
- textureCompressed = texture2dArray->isCompressed(level);
- textureIsDepth = texture2dArray->isDepth(level);
- textureLevelWidth = texture2dArray->getWidth(level);
- textureLevelHeight = texture2dArray->getHeight(level);
- textureLevelDepth = texture2dArray->getLayers(level);
- texture = texture2dArray;
- }
- }
- break;
-
- case GL_TEXTURE_3D:
- {
- gl::Texture3D *texture3d = context->getTexture3D();
- if (texture3d)
- {
- textureInternalFormat = texture3d->getInternalFormat(level);
- textureCompressed = texture3d->isCompressed(level);
- textureIsDepth = texture3d->isDepth(level);
- textureLevelWidth = texture3d->getWidth(level);
- textureLevelHeight = texture3d->getHeight(level);
- textureLevelDepth = texture3d->getDepth(level);
- texture = texture3d;
- }
- }
- break;
-
- default:
- return gl::error(GL_INVALID_ENUM, false);
- }
-
- if (!texture)
- {
- return gl::error(GL_INVALID_OPERATION, false);
- }
-
- if (texture->isImmutable() && !isSubImage)
- {
- return gl::error(GL_INVALID_OPERATION, false);
- }
-
- if (textureIsDepth)
- {
- return gl::error(GL_INVALID_OPERATION, false);
- }
-
- if (textureCompressed)
- {
- if ((width % 4 != 0 && width != textureLevelWidth) ||
- (height % 4 != 0 && height != textureLevelHeight))
- {
- return gl::error(GL_INVALID_OPERATION, false);
- }
- }
if (isSubImage)
{
- if (xoffset + width > textureLevelWidth ||
- yoffset + height > textureLevelHeight ||
- zoffset >= textureLevelDepth)
- {
- return gl::error(GL_INVALID_VALUE, false);
- }
-
- if (!gl::IsValidCopyTexImageCombination(textureInternalFormat, colorbufferInternalFormat, context->getReadFramebufferHandle(),
+ if (!gl::IsValidCopyTexImageCombination(textureInternalFormat, colorbufferInternalFormat,
+ context->getReadFramebufferHandle(),
context->getClientVersion()))
{
return gl::error(GL_INVALID_OPERATION, false);
@@ -448,15 +341,14 @@ bool ValidateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
}
else
{
- if (!gl::IsValidCopyTexImageCombination(internalformat, colorbufferInternalFormat, context->getReadFramebufferHandle(),
+ if (!gl::IsValidCopyTexImageCombination(internalformat, colorbufferInternalFormat,
+ context->getReadFramebufferHandle(),
context->getClientVersion()))
{
return gl::error(GL_INVALID_OPERATION, false);
}
}
-
-
// If width or height is zero, it is a no-op. Return false without setting an error.
return (width > 0 && height > 0);
}
diff --git a/src/preprocessor.target.darwin-arm.mk b/src/preprocessor.target.darwin-arm.mk
index 0f770797..8db3dbde 100644
--- a/src/preprocessor.target.darwin-arm.mk
+++ b/src/preprocessor.target.darwin-arm.mk
@@ -91,6 +91,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -118,6 +119,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -190,6 +192,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/src/preprocessor.target.darwin-arm64.mk b/src/preprocessor.target.darwin-arm64.mk
index 3b80264e..aa336238 100644
--- a/src/preprocessor.target.darwin-arm64.mk
+++ b/src/preprocessor.target.darwin-arm64.mk
@@ -81,6 +81,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -108,6 +109,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -169,6 +171,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/src/preprocessor.target.darwin-mips.mk b/src/preprocessor.target.darwin-mips.mk
index 1d15f986..2297e018 100644
--- a/src/preprocessor.target.darwin-mips.mk
+++ b/src/preprocessor.target.darwin-mips.mk
@@ -86,6 +86,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -113,6 +114,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -180,6 +182,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -207,6 +210,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/src/preprocessor.target.darwin-x86.mk b/src/preprocessor.target.darwin-x86.mk
index aa617420..061544a4 100644
--- a/src/preprocessor.target.darwin-x86.mk
+++ b/src/preprocessor.target.darwin-x86.mk
@@ -86,6 +86,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -113,6 +114,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -179,6 +181,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/src/preprocessor.target.darwin-x86_64.mk b/src/preprocessor.target.darwin-x86_64.mk
index 80701007..67b61825 100644
--- a/src/preprocessor.target.darwin-x86_64.mk
+++ b/src/preprocessor.target.darwin-x86_64.mk
@@ -85,6 +85,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -112,6 +113,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/src/preprocessor.target.linux-arm.mk b/src/preprocessor.target.linux-arm.mk
index 0f770797..8db3dbde 100644
--- a/src/preprocessor.target.linux-arm.mk
+++ b/src/preprocessor.target.linux-arm.mk
@@ -91,6 +91,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -118,6 +119,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -190,6 +192,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -217,6 +220,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/src/preprocessor.target.linux-arm64.mk b/src/preprocessor.target.linux-arm64.mk
index 3b80264e..aa336238 100644
--- a/src/preprocessor.target.linux-arm64.mk
+++ b/src/preprocessor.target.linux-arm64.mk
@@ -81,6 +81,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -108,6 +109,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -169,6 +171,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -196,6 +199,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/src/preprocessor.target.linux-mips.mk b/src/preprocessor.target.linux-mips.mk
index 1d15f986..2297e018 100644
--- a/src/preprocessor.target.linux-mips.mk
+++ b/src/preprocessor.target.linux-mips.mk
@@ -86,6 +86,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -113,6 +114,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -180,6 +182,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -207,6 +210,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/src/preprocessor.target.linux-x86.mk b/src/preprocessor.target.linux-x86.mk
index aa617420..061544a4 100644
--- a/src/preprocessor.target.linux-x86.mk
+++ b/src/preprocessor.target.linux-x86.mk
@@ -86,6 +86,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -113,6 +114,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -179,6 +181,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -206,6 +209,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/src/preprocessor.target.linux-x86_64.mk b/src/preprocessor.target.linux-x86_64.mk
index 80701007..67b61825 100644
--- a/src/preprocessor.target.linux-x86_64.mk
+++ b/src/preprocessor.target.linux-x86_64.mk
@@ -85,6 +85,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -112,6 +113,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
@@ -177,6 +179,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -204,6 +207,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
diff --git a/src/translator.target.darwin-arm.mk b/src/translator.target.darwin-arm.mk
index 7dbe7efb..0aada233 100644
--- a/src/translator.target.darwin-arm.mk
+++ b/src/translator.target.darwin-arm.mk
@@ -81,6 +81,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -109,6 +110,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -183,6 +185,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -211,6 +214,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator.target.darwin-arm64.mk b/src/translator.target.darwin-arm64.mk
index 96ea8ca9..6beb1e66 100644
--- a/src/translator.target.darwin-arm64.mk
+++ b/src/translator.target.darwin-arm64.mk
@@ -71,6 +71,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -99,6 +100,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -162,6 +164,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -190,6 +193,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator.target.darwin-mips.mk b/src/translator.target.darwin-mips.mk
index 946619a1..cbbb8f0e 100644
--- a/src/translator.target.darwin-mips.mk
+++ b/src/translator.target.darwin-mips.mk
@@ -76,6 +76,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -104,6 +105,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -173,6 +175,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -201,6 +204,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator.target.darwin-x86.mk b/src/translator.target.darwin-x86.mk
index 53620aef..637c5684 100644
--- a/src/translator.target.darwin-x86.mk
+++ b/src/translator.target.darwin-x86.mk
@@ -76,6 +76,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -104,6 +105,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -172,6 +174,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -200,6 +203,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator.target.darwin-x86_64.mk b/src/translator.target.darwin-x86_64.mk
index 7d790aaf..8fe864dc 100644
--- a/src/translator.target.darwin-x86_64.mk
+++ b/src/translator.target.darwin-x86_64.mk
@@ -75,6 +75,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -103,6 +104,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -170,6 +172,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -198,6 +201,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator.target.linux-arm.mk b/src/translator.target.linux-arm.mk
index 7dbe7efb..0aada233 100644
--- a/src/translator.target.linux-arm.mk
+++ b/src/translator.target.linux-arm.mk
@@ -81,6 +81,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -109,6 +110,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -183,6 +185,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -211,6 +214,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator.target.linux-arm64.mk b/src/translator.target.linux-arm64.mk
index 96ea8ca9..6beb1e66 100644
--- a/src/translator.target.linux-arm64.mk
+++ b/src/translator.target.linux-arm64.mk
@@ -71,6 +71,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -99,6 +100,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -162,6 +164,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -190,6 +193,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator.target.linux-mips.mk b/src/translator.target.linux-mips.mk
index 946619a1..cbbb8f0e 100644
--- a/src/translator.target.linux-mips.mk
+++ b/src/translator.target.linux-mips.mk
@@ -76,6 +76,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -104,6 +105,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -173,6 +175,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -201,6 +204,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator.target.linux-x86.mk b/src/translator.target.linux-x86.mk
index 53620aef..637c5684 100644
--- a/src/translator.target.linux-x86.mk
+++ b/src/translator.target.linux-x86.mk
@@ -76,6 +76,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -104,6 +105,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -172,6 +174,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -200,6 +203,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator.target.linux-x86_64.mk b/src/translator.target.linux-x86_64.mk
index 7d790aaf..8fe864dc 100644
--- a/src/translator.target.linux-x86_64.mk
+++ b/src/translator.target.linux-x86_64.mk
@@ -75,6 +75,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -103,6 +104,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -170,6 +172,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -198,6 +201,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator_lib.target.darwin-arm.mk b/src/translator_lib.target.darwin-arm.mk
index 45b346e0..900ae5de 100644
--- a/src/translator_lib.target.darwin-arm.mk
+++ b/src/translator_lib.target.darwin-arm.mk
@@ -139,6 +139,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -166,6 +167,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -240,6 +242,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -267,6 +270,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator_lib.target.darwin-arm64.mk b/src/translator_lib.target.darwin-arm64.mk
index b9d54ea4..2c4c2c1a 100644
--- a/src/translator_lib.target.darwin-arm64.mk
+++ b/src/translator_lib.target.darwin-arm64.mk
@@ -129,6 +129,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -156,6 +157,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -219,6 +221,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -246,6 +249,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator_lib.target.darwin-mips.mk b/src/translator_lib.target.darwin-mips.mk
index 5a23736d..f12651c4 100644
--- a/src/translator_lib.target.darwin-mips.mk
+++ b/src/translator_lib.target.darwin-mips.mk
@@ -134,6 +134,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -161,6 +162,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -230,6 +232,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -257,6 +260,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator_lib.target.darwin-x86.mk b/src/translator_lib.target.darwin-x86.mk
index 4fa5b175..e68d87c8 100644
--- a/src/translator_lib.target.darwin-x86.mk
+++ b/src/translator_lib.target.darwin-x86.mk
@@ -134,6 +134,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -161,6 +162,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -229,6 +231,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -256,6 +259,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator_lib.target.darwin-x86_64.mk b/src/translator_lib.target.darwin-x86_64.mk
index 95721ff7..159f0dc2 100644
--- a/src/translator_lib.target.darwin-x86_64.mk
+++ b/src/translator_lib.target.darwin-x86_64.mk
@@ -133,6 +133,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -160,6 +161,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -227,6 +229,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -254,6 +257,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator_lib.target.linux-arm.mk b/src/translator_lib.target.linux-arm.mk
index 45b346e0..900ae5de 100644
--- a/src/translator_lib.target.linux-arm.mk
+++ b/src/translator_lib.target.linux-arm.mk
@@ -139,6 +139,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -166,6 +167,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -240,6 +242,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -267,6 +270,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator_lib.target.linux-arm64.mk b/src/translator_lib.target.linux-arm64.mk
index b9d54ea4..2c4c2c1a 100644
--- a/src/translator_lib.target.linux-arm64.mk
+++ b/src/translator_lib.target.linux-arm64.mk
@@ -129,6 +129,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -156,6 +157,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -219,6 +221,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -246,6 +249,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator_lib.target.linux-mips.mk b/src/translator_lib.target.linux-mips.mk
index 5a23736d..f12651c4 100644
--- a/src/translator_lib.target.linux-mips.mk
+++ b/src/translator_lib.target.linux-mips.mk
@@ -134,6 +134,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -161,6 +162,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -230,6 +232,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -257,6 +260,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator_lib.target.linux-x86.mk b/src/translator_lib.target.linux-x86.mk
index 4fa5b175..e68d87c8 100644
--- a/src/translator_lib.target.linux-x86.mk
+++ b/src/translator_lib.target.linux-x86.mk
@@ -134,6 +134,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -161,6 +162,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -229,6 +231,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -256,6 +259,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/src/translator_lib.target.linux-x86_64.mk b/src/translator_lib.target.linux-x86_64.mk
index 95721ff7..159f0dc2 100644
--- a/src/translator_lib.target.linux-x86_64.mk
+++ b/src/translator_lib.target.linux-x86_64.mk
@@ -133,6 +133,7 @@ MY_DEFS_Debug := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -160,6 +161,7 @@ MY_DEFS_Debug := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Debug := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
@@ -227,6 +229,7 @@ MY_DEFS_Release := \
'-DUSE_LIBJPEG_TURBO=1' \
'-DENABLE_WEBRTC=1' \
'-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_BROWSER_CDMS' \
'-DENABLE_CONFIGURATION_POLICY' \
'-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \
'-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \
@@ -254,6 +257,7 @@ MY_DEFS_Release := \
# Include paths placed before CFLAGS/CPPFLAGS
LOCAL_C_INCLUDES_Release := \
+ $(gyp_shared_intermediate_dir) \
$(LOCAL_PATH)/third_party/angle/src \
$(LOCAL_PATH)/third_party/angle/include \
$(PWD)/frameworks/wilhelm/include \
diff --git a/tests/angle_tests/GLSLStructTest.cpp b/tests/angle_tests/GLSLStructTest.cpp
new file mode 100644
index 00000000..531afe1b
--- /dev/null
+++ b/tests/angle_tests/GLSLStructTest.cpp
@@ -0,0 +1,116 @@
+#include "ANGLETest.h"
+
+class GLSLStructTest : public ANGLETest
+{
+protected:
+ GLSLStructTest()
+ {
+ setWindowWidth(128);
+ setWindowHeight(128);
+ setConfigRedBits(8);
+ setConfigGreenBits(8);
+ setConfigBlueBits(8);
+ setConfigAlphaBits(8);
+ }
+
+ virtual void SetUp()
+ {
+ ANGLETest::SetUp();
+
+ mVertexShaderSource = SHADER_SOURCE
+ (
+ attribute vec4 inputAttribute;
+ void main()
+ {
+ gl_Position = inputAttribute;
+ }
+ );
+ }
+
+ std::string mVertexShaderSource;
+};
+
+TEST_F(GLSLStructTest, nameless_scoped_structs)
+{
+ const std::string fragmentShaderSource = SHADER_SOURCE
+ (
+ precision mediump float;
+
+ void main()
+ {
+ struct
+ {
+ float q;
+ } b;
+
+ gl_FragColor = vec4(1, 0, 0, 1);
+ gl_FragColor.a += b.q;
+ }
+ );
+
+ GLuint program = compileProgram(mVertexShaderSource, fragmentShaderSource);
+ EXPECT_NE(0u, program);
+}
+TEST_F(GLSLStructTest, scoped_structs_order_bug)
+{
+ const std::string fragmentShaderSource = SHADER_SOURCE
+ (
+ precision mediump float;
+
+ struct T
+ {
+ float f;
+ };
+
+ void main()
+ {
+ T a;
+
+ struct T
+ {
+ float q;
+ };
+
+ T b;
+
+ gl_FragColor = vec4(1, 0, 0, 1);
+ gl_FragColor.a += a.f;
+ gl_FragColor.a += b.q;
+ }
+ );
+
+ GLuint program = compileProgram(mVertexShaderSource, fragmentShaderSource);
+ EXPECT_NE(0u, program);
+}
+
+TEST_F(GLSLStructTest, scoped_structs_bug)
+{
+ const std::string fragmentShaderSource = SHADER_SOURCE
+ (
+ precision mediump float;
+
+ struct T_0
+ {
+ float f;
+ };
+
+ void main()
+ {
+ gl_FragColor = vec4(1, 0, 0, 1);
+
+ struct T
+ {
+ vec2 v;
+ };
+
+ T_0 a;
+ T b;
+
+ gl_FragColor.a += a.f;
+ gl_FragColor.a += b.v.x;
+ }
+ );
+
+ GLuint program = compileProgram(mVertexShaderSource, fragmentShaderSource);
+ EXPECT_NE(0u, program);
+}