Get rid of VertexFormatType.
The enum VertexFormatType is redundant with angle::FormatID. The Vulkan
back end has already eschewed VertexFormatType, this change updates the
D3D back ends.
BUG=angleproject:2531
Change-Id: I67ea2203ca80be828f4c757a37810fe67a279364
Reviewed-on: https://chromium-review.googlesource.com/c/1263899
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/ProgramD3D.cpp b/src/libANGLE/renderer/d3d/ProgramD3D.cpp
index 2bd0059..f1a0587 100644
--- a/src/libANGLE/renderer/d3d/ProgramD3D.cpp
+++ b/src/libANGLE/renderer/d3d/ProgramD3D.cpp
@@ -53,10 +53,10 @@
GLenum componentType = gl::VariableComponentType(transposedType);
GLuint components = static_cast<GLuint>(gl::VariableColumnCount(transposedType));
bool pureInt = (componentType != GL_FLOAT);
- gl::VertexFormatType defaultType =
- gl::GetVertexFormatType(componentType, GL_FALSE, components, pureInt);
+ angle::FormatID defaultID =
+ gl::GetVertexFormatID(componentType, GL_FALSE, components, pureInt);
- inputLayoutOut->push_back(defaultType);
+ inputLayoutOut->push_back(defaultID);
}
}
}
@@ -502,15 +502,15 @@
for (size_t index = 0; index < inputLayout.size(); ++index)
{
- gl::VertexFormatType vertexFormatType = inputLayout[index];
- if (vertexFormatType == gl::VERTEX_FORMAT_INVALID)
+ angle::FormatID vertexFormatID = inputLayout[index];
+ if (vertexFormatID == angle::FormatID::NONE)
continue;
- VertexConversionType conversionType = renderer->getVertexConversionType(vertexFormatType);
+ VertexConversionType conversionType = renderer->getVertexConversionType(vertexFormatID);
if ((conversionType & VERTEX_CONVERT_GPU) == 0)
continue;
- GLenum componentType = renderer->getVertexComponentType(vertexFormatType);
+ GLenum componentType = renderer->getVertexComponentType(vertexFormatID);
(*signatureOut)[index] = GetAttribType(componentType);
}
}
@@ -928,11 +928,11 @@
vertexShaderIndex++)
{
size_t inputLayoutSize = stream->readInt<size_t>();
- gl::InputLayout inputLayout(inputLayoutSize, gl::VERTEX_FORMAT_INVALID);
+ gl::InputLayout inputLayout(inputLayoutSize, angle::FormatID::NONE);
for (size_t inputIndex = 0; inputIndex < inputLayoutSize; inputIndex++)
{
- inputLayout[inputIndex] = stream->readInt<gl::VertexFormatType>();
+ inputLayout[inputIndex] = stream->readInt<angle::FormatID>();
}
unsigned int vertexShaderSize = stream->readInt<unsigned int>();
@@ -2729,11 +2729,11 @@
{
if (mCachedInputLayout.size() < static_cast<size_t>(d3dSemantic + 1))
{
- mCachedInputLayout.resize(d3dSemantic + 1, gl::VERTEX_FORMAT_INVALID);
+ mCachedInputLayout.resize(d3dSemantic + 1, angle::FormatID::NONE);
}
mCachedInputLayout[d3dSemantic] =
- GetVertexFormatType(vertexAttributes[locationIndex],
- state.getVertexAttribCurrentValue(locationIndex).Type);
+ GetVertexFormatID(vertexAttributes[locationIndex],
+ state.getVertexAttribCurrentValue(locationIndex).Type);
}
}