diff options
author | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-24 19:19:25 +0000 |
---|---|---|
committer | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-24 19:19:25 +0000 |
commit | 2331a49ecb27f38888bf4f60f24e054cbb8a8890 (patch) | |
tree | de3d03558bd82742292cebb81f1ed68ba1626342 /o3d/gpu_plugin/gpu_plugin.gyp | |
parent | dfb5a4cc453d4a78e655d6f4cb5e11e8ced54c1b (diff) | |
download | chromium_src-2331a49ecb27f38888bf4f60f24e054cbb8a8890.zip chromium_src-2331a49ecb27f38888bf4f60f24e054cbb8a8890.tar.gz chromium_src-2331a49ecb27f38888bf4f60f24e054cbb8a8890.tar.bz2 |
GPUProcessor uses O3D command buffer service to render to a window.
Added libraries that contain a subset of the O3D command buffer code independent on NaCl.
Extracted Upcall interface from CommandBufferEngine.
Now this works in JavaScript to clear the GPU plugin element to a random color:
// BEGIN_FRAME
sharedMemory.setInt32(putOffset++, 0x00000201);
// CLEAR
sharedMemory.setInt32(putOffset++, 0x00000408);
sharedMemory.setInt32(putOffset++, 7);
sharedMemory.setFloat(putOffset++, Math.random());
sharedMemory.setFloat(putOffset++, Math.random());
sharedMemory.setFloat(putOffset++, Math.random());
sharedMemory.setFloat(putOffset++, 1);
sharedMemory.setFloat(putOffset++, 0.5);
sharedMemory.setInt32(putOffset++, 0);
// END_FRAME
sharedMemory.setInt32(putOffset++, 0x00000301);
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/234001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27098 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/gpu_plugin/gpu_plugin.gyp')
-rw-r--r-- | o3d/gpu_plugin/gpu_plugin.gyp | 136 |
1 files changed, 136 insertions, 0 deletions
diff --git a/o3d/gpu_plugin/gpu_plugin.gyp b/o3d/gpu_plugin/gpu_plugin.gyp index 4831568..0276ee9 100644 --- a/o3d/gpu_plugin/gpu_plugin.gyp +++ b/o3d/gpu_plugin/gpu_plugin.gyp @@ -106,11 +106,131 @@ ], }, + # This builds a subset of the O3D command buffer common library. This is a + # separate library for the time being because I need a subset that is not + # dependent on NaCl. + { + 'target_name': 'command_buffer_common_subset', + 'type': '<(library)', + 'include_dirs': [ + '..', + '../..', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '..', + ], + }, # 'direct_dependent_settings' + 'sources': [ + '../command_buffer/common/cross/bitfield_helpers.h', + '../command_buffer/common/cross/cmd_buffer_format.h', + '../command_buffer/common/cross/gapi_interface.h', + '../command_buffer/common/cross/logging.h', + '../command_buffer/common/cross/mocks.h', + '../command_buffer/common/cross/resource.cc', + '../command_buffer/common/cross/resource.h', + '../command_buffer/common/cross/types.h', + ], + }, + + # This builds a subset of the O3D command buffer service. This is a separate + # library for the time being because I need a subset that is not dependent + # on NaCl. + { + 'target_name': 'command_buffer_service_subset', + 'type': '<(library)', + 'include_dirs': [ + '..', + '../..', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '..', + ], + }, # 'direct_dependent_settings' + 'dependencies': [ + 'command_buffer_common_subset', + ], + 'sources': [ + '../command_buffer/service/cross/cmd_parser.cc', + '../command_buffer/service/cross/cmd_parser.h', + '../command_buffer/service/cross/effect_utils.cc', + '../command_buffer/service/cross/effect_utils.h', + '../command_buffer/service/cross/gapi_decoder.cc', + '../command_buffer/service/cross/gapi_decoder.h', + '../command_buffer/service/cross/mocks.h', + '../command_buffer/service/cross/precompile.cc', + '../command_buffer/service/cross/precompile.h', + '../command_buffer/service/cross/resource.cc', + '../command_buffer/service/cross/resource.h', + '../command_buffer/service/cross/texture_utils.cc', + '../command_buffer/service/cross/texture_utils.h', + ], + + 'conditions': [ + ['OS == "win"', + { + 'sources': [ + '../command_buffer/service/win/d3d9/d3d9_utils.h', + '../command_buffer/service/win/d3d9/effect_d3d9.cc', + '../command_buffer/service/win/d3d9/effect_d3d9.h', + '../command_buffer/service/win/d3d9/gapi_d3d9.cc', + '../command_buffer/service/win/d3d9/gapi_d3d9.h', + '../command_buffer/service/win/d3d9/geometry_d3d9.cc', + '../command_buffer/service/win/d3d9/geometry_d3d9.h', + '../command_buffer/service/win/d3d9/render_surface_d3d9.cc', + '../command_buffer/service/win/d3d9/render_surface_d3d9.h', + '../command_buffer/service/win/d3d9/sampler_d3d9.cc', + '../command_buffer/service/win/d3d9/sampler_d3d9.h', + '../command_buffer/service/win/d3d9/states_d3d9.cc', + '../command_buffer/service/win/d3d9/texture_d3d9.cc', + '../command_buffer/service/win/d3d9/texture_d3d9.h', + ], # 'sources' + 'include_dirs': [ + '$(DXSDK_DIR)/Include', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '$(DXSDK_DIR)/Include', + ], + }, # 'direct_dependent_settings' + }, + ], + ['OS == "mac" or OS == "linux"', + { + 'sources': [ + '../command_buffer/service/cross/gl/effect_gl.cc', + '../command_buffer/service/cross/gl/effect_gl.h', + '../command_buffer/service/cross/gl/gapi_gl.cc', + '../command_buffer/service/cross/gl/gapi_gl.h', + '../command_buffer/service/cross/gl/geometry_gl.cc', + '../command_buffer/service/cross/gl/geometry_gl.h', + '../command_buffer/service/cross/gl/gl_utils.h', + '../command_buffer/service/cross/gl/sampler_gl.cc', + '../command_buffer/service/cross/gl/sampler_gl.h', + '../command_buffer/service/cross/gl/states_gl.cc', + '../command_buffer/service/cross/gl/texture_gl.cc', + '../command_buffer/service/cross/gl/texture_gl.h', + ], # 'sources' + }, + ], + ['OS == "linux"', + { + 'sources': [ + '../command_buffer/service/linux/x_utils.cc', + '../command_buffer/service/linux/x_utils.h', + ], + }, + ], + ], + }, + { 'target_name': 'gpu_plugin', 'type': '<(library)', 'dependencies': [ '../../base/base.gyp:base', + 'command_buffer_service_subset', 'np_utils', ], 'include_dirs': [ @@ -140,6 +260,7 @@ 'target_name': 'gpu_plugin_unittests', 'type': 'executable', 'dependencies': [ + 'command_buffer_service_subset', 'gpu_plugin', 'np_utils', 'system_services', @@ -151,6 +272,21 @@ '../..', '../../third_party/npapi', ], + 'conditions': [ + ['OS == "win" and (renderer == "d3d9" or renderer == "cb")', + { + # These dependencies are temporary until the command buffer code + # loads D3D and D3DX dynamically. + 'link_settings': { + 'libraries': [ + '"$(DXSDK_DIR)/Lib/x86/DxErr.lib"', + '"$(DXSDK_DIR)/Lib/x86/d3dx9.lib"', + '-ld3d9.lib', + ], + }, + }, + ], + ], 'sources': [ 'command_buffer_unittest.cc', 'gpu_plugin_unittest.cc', |