Commit 47630727 authored by Kai Ninomiya's avatar Kai Ninomiya Committed by Commit Bot

Command buffer changes needed for WebGPU in Blink

A few more changes, following up to the previous commit which added the WebGPU command buffer.

Bug: 868192
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Iade27669c2bdebb598463b579a8dfaa6b91fbb9b
Reviewed-on: https://chromium-review.googlesource.com/1192411Reviewed-by: default avatarZhenyao Mo <zmo@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#586784}
parent 02a6a202
...@@ -27,10 +27,12 @@ _NAMED_TYPE_INFO = { ...@@ -27,10 +27,12 @@ _NAMED_TYPE_INFO = {
# Must match function names specified in "webgpu_cmd_buffer_functions.txt". # Must match function names specified in "webgpu_cmd_buffer_functions.txt".
# #
# Options are documented in build_gles2_cmd_buffer.py/build_raster_cmd_buffer.py # Options are documented in build_gles2_cmd_buffer.py/build_raster_cmd_buffer.py
# (Note: some options (like decoder_func and unit_test) currently have no
# effect, because WriteServiceImplementation and WriteServiceUnitTests are not
# used below.)
_FUNCTION_INFO = { _FUNCTION_INFO = {
'NoOp': { 'Dummy': {
'decoder_func': 'DoNoOp', 'impl_func': False,
'unit_test': False,
}, },
} }
...@@ -76,6 +78,8 @@ def main(argv): ...@@ -76,6 +78,8 @@ def main(argv):
"gpu/command_buffer/client/webgpu_implementation_unittest_autogen.h") "gpu/command_buffer/client/webgpu_implementation_unittest_autogen.h")
gen.WriteCmdHelperHeader( gen.WriteCmdHelperHeader(
"gpu/command_buffer/client/webgpu_cmd_helper_autogen.h") "gpu/command_buffer/client/webgpu_cmd_helper_autogen.h")
# Note: No gen.WriteServiceImplementation
# Note: No gen.WriteServiceUnitTests
gen.WriteServiceUtilsHeader( gen.WriteServiceUtilsHeader(
"gpu/command_buffer/service/webgpu_cmd_validation_autogen.h") "gpu/command_buffer/service/webgpu_cmd_validation_autogen.h")
gen.WriteServiceUtilsImplementation( gen.WriteServiceUtilsImplementation(
......
...@@ -14,5 +14,12 @@ namespace webgpu { ...@@ -14,5 +14,12 @@ namespace webgpu {
// instead of having to edit some template or the code generator. // instead of having to edit some template or the code generator.
#include "gpu/command_buffer/client/webgpu_implementation_impl_autogen.h" #include "gpu/command_buffer/client/webgpu_implementation_impl_autogen.h"
void WebGPUImplementation::Dummy() {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] wgDummy()");
helper_->Dummy();
helper_->Flush();
}
} // namespace webgpu } // namespace webgpu
} // namespace gpu } // namespace gpu
...@@ -13,11 +13,4 @@ ...@@ -13,11 +13,4 @@
#ifndef GPU_COMMAND_BUFFER_CLIENT_WEBGPU_IMPLEMENTATION_IMPL_AUTOGEN_H_ #ifndef GPU_COMMAND_BUFFER_CLIENT_WEBGPU_IMPLEMENTATION_IMPL_AUTOGEN_H_
#define GPU_COMMAND_BUFFER_CLIENT_WEBGPU_IMPLEMENTATION_IMPL_AUTOGEN_H_ #define GPU_COMMAND_BUFFER_CLIENT_WEBGPU_IMPLEMENTATION_IMPL_AUTOGEN_H_
void WebGPUImplementation::Dummy() {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] wgDummy("
<< ")");
helper_->Dummy();
}
#endif // GPU_COMMAND_BUFFER_CLIENT_WEBGPU_IMPLEMENTATION_IMPL_AUTOGEN_H_ #endif // GPU_COMMAND_BUFFER_CLIENT_WEBGPU_IMPLEMENTATION_IMPL_AUTOGEN_H_
...@@ -1827,10 +1827,6 @@ void FeatureInfo::EnableES3Validators() { ...@@ -1827,10 +1827,6 @@ void FeatureInfo::EnableES3Validators() {
} }
} }
bool FeatureInfo::IsGLContext() const {
return IsGLContextType(context_type_);
}
bool FeatureInfo::IsWebGLContext() const { bool FeatureInfo::IsWebGLContext() const {
return IsWebGLContextType(context_type_); return IsWebGLContextType(context_type_);
} }
...@@ -1851,10 +1847,6 @@ bool FeatureInfo::IsWebGL2ComputeContext() const { ...@@ -1851,10 +1847,6 @@ bool FeatureInfo::IsWebGL2ComputeContext() const {
return IsWebGL2ComputeContextType(context_type_); return IsWebGL2ComputeContextType(context_type_);
} }
bool FeatureInfo::IsWebGPUContext() const {
return IsWebGPUContextType(context_type_);
}
void FeatureInfo::AddExtensionString(const base::StringPiece& extension) { void FeatureInfo::AddExtensionString(const base::StringPiece& extension) {
extensions_.insert(extension); extensions_.insert(extension);
} }
......
...@@ -179,13 +179,11 @@ class GPU_GLES2_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { ...@@ -179,13 +179,11 @@ class GPU_GLES2_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> {
bool disable_shader_translator() const { return disable_shader_translator_; } bool disable_shader_translator() const { return disable_shader_translator_; }
bool IsGLContext() const;
bool IsWebGLContext() const; bool IsWebGLContext() const;
bool IsWebGL1OrES2Context() const; bool IsWebGL1OrES2Context() const;
bool IsWebGL2OrES3Context() const; bool IsWebGL2OrES3Context() const;
bool IsWebGL2OrES3OrHigherContext() const; bool IsWebGL2OrES3OrHigherContext() const;
bool IsWebGL2ComputeContext() const; bool IsWebGL2ComputeContext() const;
bool IsWebGPUContext() const;
void EnableCHROMIUMTextureStorageImage(); void EnableCHROMIUMTextureStorageImage();
void EnableCHROMIUMColorBufferFloatRGBA(); void EnableCHROMIUMColorBufferFloatRGBA();
......
...@@ -86,13 +86,10 @@ class WebGPUDecoderImpl final : public WebGPUDecoder { ...@@ -86,13 +86,10 @@ class WebGPUDecoderImpl final : public WebGPUDecoder {
return nullptr; return nullptr;
} }
bool HasPendingQueries() const override { return false; } bool HasPendingQueries() const override { return false; }
void ProcessPendingQueries(bool did_finish) override { NOTREACHED(); } void ProcessPendingQueries(bool did_finish) override {}
bool HasMoreIdleWork() const override { return false; } bool HasMoreIdleWork() const override { return false; }
void PerformIdleWork() override { NOTREACHED(); } void PerformIdleWork() override { NOTREACHED(); }
bool HasPollingWork() const override { bool HasPollingWork() const override { return false; }
NOTREACHED();
return false;
}
void PerformPollingWork() override { NOTREACHED(); } void PerformPollingWork() override { NOTREACHED(); }
TextureBase* GetTextureBase(uint32_t client_id) override { TextureBase* GetTextureBase(uint32_t client_id) override {
NOTREACHED(); NOTREACHED();
...@@ -344,6 +341,7 @@ error::Error WebGPUDecoderImpl::DoCommands(unsigned int num_commands, ...@@ -344,6 +341,7 @@ error::Error WebGPUDecoderImpl::DoCommands(unsigned int num_commands,
error::Error WebGPUDecoderImpl::HandleDummy(uint32_t immediate_data_size, error::Error WebGPUDecoderImpl::HandleDummy(uint32_t immediate_data_size,
const volatile void* cmd_data) { const volatile void* cmd_data) {
DLOG(ERROR) << "WebGPUDecoderImpl::HandleDummy";
return error::kNoError; return error::kNoError;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment