Remove all "WithTint" suffixes from Dawn native.
The D3D12 and Metal backends no longer support any other shading language translator, so the suffix is superfluous. Bug: dawn:1099 Change-Id: I6a1a249a80d59dbf9cabf5d4ea917f852745e78e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63400 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
parent
3f249c12b5
commit
c0f20fbc54
|
@ -180,7 +180,7 @@ namespace dawn_native { namespace d3d12 {
|
||||||
return InitializeBase(parseResult);
|
return InitializeBase(parseResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultOrError<std::string> ShaderModule::TranslateToHLSLWithTint(
|
ResultOrError<std::string> ShaderModule::TranslateToHLSL(
|
||||||
const char* entryPointName,
|
const char* entryPointName,
|
||||||
SingleShaderStage stage,
|
SingleShaderStage stage,
|
||||||
PipelineLayout* layout,
|
PipelineLayout* layout,
|
||||||
|
@ -322,8 +322,8 @@ namespace dawn_native { namespace d3d12 {
|
||||||
std::string remappedEntryPoint;
|
std::string remappedEntryPoint;
|
||||||
CompiledShader compiledShader = {};
|
CompiledShader compiledShader = {};
|
||||||
DAWN_TRY_ASSIGN(hlslSource,
|
DAWN_TRY_ASSIGN(hlslSource,
|
||||||
TranslateToHLSLWithTint(entryPointName, stage, layout, &remappedEntryPoint,
|
TranslateToHLSL(entryPointName, stage, layout, &remappedEntryPoint,
|
||||||
&compiledShader.firstOffsetInfo));
|
&compiledShader.firstOffsetInfo));
|
||||||
entryPointName = remappedEntryPoint.c_str();
|
entryPointName = remappedEntryPoint.c_str();
|
||||||
|
|
||||||
if (device->IsToggleEnabled(Toggle::DumpShaders)) {
|
if (device->IsToggleEnabled(Toggle::DumpShaders)) {
|
||||||
|
|
|
@ -59,11 +59,11 @@ namespace dawn_native { namespace d3d12 {
|
||||||
~ShaderModule() override = default;
|
~ShaderModule() override = default;
|
||||||
MaybeError Initialize(ShaderModuleParseResult* parseResult);
|
MaybeError Initialize(ShaderModuleParseResult* parseResult);
|
||||||
|
|
||||||
ResultOrError<std::string> TranslateToHLSLWithTint(const char* entryPointName,
|
ResultOrError<std::string> TranslateToHLSL(const char* entryPointName,
|
||||||
SingleShaderStage stage,
|
SingleShaderStage stage,
|
||||||
PipelineLayout* layout,
|
PipelineLayout* layout,
|
||||||
std::string* remappedEntryPointName,
|
std::string* remappedEntryPointName,
|
||||||
FirstOffsetInfo* firstOffsetInfo) const;
|
FirstOffsetInfo* firstOffsetInfo) const;
|
||||||
|
|
||||||
ResultOrError<PersistentCacheKey> CreateHLSLKey(const char* entryPointName,
|
ResultOrError<PersistentCacheKey> CreateHLSLKey(const char* entryPointName,
|
||||||
SingleShaderStage stage,
|
SingleShaderStage stage,
|
||||||
|
|
|
@ -47,15 +47,15 @@ namespace dawn_native { namespace metal {
|
||||||
const VertexState* vertexState = nullptr);
|
const VertexState* vertexState = nullptr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ResultOrError<std::string> TranslateToMSLWithTint(const char* entryPointName,
|
ResultOrError<std::string> TranslateToMSL(const char* entryPointName,
|
||||||
SingleShaderStage stage,
|
SingleShaderStage stage,
|
||||||
const PipelineLayout* layout,
|
const PipelineLayout* layout,
|
||||||
uint32_t sampleMask,
|
uint32_t sampleMask,
|
||||||
const RenderPipeline* renderPipeline,
|
const RenderPipeline* renderPipeline,
|
||||||
const VertexState* vertexState,
|
const VertexState* vertexState,
|
||||||
std::string* remappedEntryPointName,
|
std::string* remappedEntryPointName,
|
||||||
bool* needsStorageBufferLength,
|
bool* needsStorageBufferLength,
|
||||||
bool* hasInvariantAttribute);
|
bool* hasInvariantAttribute);
|
||||||
ShaderModule(Device* device, const ShaderModuleDescriptor* descriptor);
|
ShaderModule(Device* device, const ShaderModuleDescriptor* descriptor);
|
||||||
~ShaderModule() override = default;
|
~ShaderModule() override = default;
|
||||||
MaybeError Initialize(ShaderModuleParseResult* parseResult);
|
MaybeError Initialize(ShaderModuleParseResult* parseResult);
|
||||||
|
|
|
@ -44,16 +44,15 @@ namespace dawn_native { namespace metal {
|
||||||
return InitializeBase(parseResult);
|
return InitializeBase(parseResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultOrError<std::string> ShaderModule::TranslateToMSLWithTint(
|
ResultOrError<std::string> ShaderModule::TranslateToMSL(const char* entryPointName,
|
||||||
const char* entryPointName,
|
SingleShaderStage stage,
|
||||||
SingleShaderStage stage,
|
const PipelineLayout* layout,
|
||||||
const PipelineLayout* layout,
|
uint32_t sampleMask,
|
||||||
uint32_t sampleMask,
|
const RenderPipeline* renderPipeline,
|
||||||
const RenderPipeline* renderPipeline,
|
const VertexState* vertexState,
|
||||||
const VertexState* vertexState,
|
std::string* remappedEntryPointName,
|
||||||
std::string* remappedEntryPointName,
|
bool* needsStorageBufferLength,
|
||||||
bool* needsStorageBufferLength,
|
bool* hasInvariantAttribute) {
|
||||||
bool* hasInvariantAttribute) {
|
|
||||||
ScopedTintICEHandler scopedICEHandler(GetDevice());
|
ScopedTintICEHandler scopedICEHandler(GetDevice());
|
||||||
|
|
||||||
std::ostringstream errorStream;
|
std::ostringstream errorStream;
|
||||||
|
@ -187,10 +186,10 @@ namespace dawn_native { namespace metal {
|
||||||
std::string remappedEntryPointName;
|
std::string remappedEntryPointName;
|
||||||
std::string msl;
|
std::string msl;
|
||||||
bool hasInvariantAttribute = false;
|
bool hasInvariantAttribute = false;
|
||||||
DAWN_TRY_ASSIGN(
|
DAWN_TRY_ASSIGN(msl,
|
||||||
msl, TranslateToMSLWithTint(entryPointName, stage, layout, sampleMask, renderPipeline,
|
TranslateToMSL(entryPointName, stage, layout, sampleMask, renderPipeline,
|
||||||
vertexState, &remappedEntryPointName,
|
vertexState, &remappedEntryPointName,
|
||||||
&out->needsStorageBufferLength, &hasInvariantAttribute));
|
&out->needsStorageBufferLength, &hasInvariantAttribute));
|
||||||
|
|
||||||
// Metal uses Clang to compile the shader as C++14. Disable everything in the -Wall
|
// Metal uses Clang to compile the shader as C++14. Disable everything in the -Wall
|
||||||
// category. -Wunused-variable in particular comes up a lot in generated code, and some
|
// category. -Wunused-variable in particular comes up a lot in generated code, and some
|
||||||
|
|
Loading…
Reference in New Issue