Commit 01b05333 by Lubosz Sarnecki Committed by Commit Bot

queryutils: Handle AmbientAndDiffuse param count.

Add AmbientAndDiffuse cases for determining light and material parameter count. Define default cases as UNREACHABLE for GetLightModelParameterCount, GetLightParameterCount and GetMaterialParameterCount. Bug: angleproject:5751 Change-Id: I58acb62e66cea71277654313800dafa57c42b17e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2871794Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
parent c034d045
...@@ -2487,6 +2487,7 @@ unsigned int GetLightModelParameterCount(GLenum pname) ...@@ -2487,6 +2487,7 @@ unsigned int GetLightModelParameterCount(GLenum pname)
case GL_LIGHT_MODEL_TWO_SIDE: case GL_LIGHT_MODEL_TWO_SIDE:
return 1; return 1;
default: default:
UNREACHABLE();
return 0; return 0;
} }
} }
...@@ -2497,6 +2498,7 @@ unsigned int GetLightParameterCount(LightParameter pname) ...@@ -2497,6 +2498,7 @@ unsigned int GetLightParameterCount(LightParameter pname)
{ {
case LightParameter::Ambient: case LightParameter::Ambient:
case LightParameter::Diffuse: case LightParameter::Diffuse:
case LightParameter::AmbientAndDiffuse:
case LightParameter::Specular: case LightParameter::Specular:
case LightParameter::Position: case LightParameter::Position:
return 4; return 4;
...@@ -2509,6 +2511,7 @@ unsigned int GetLightParameterCount(LightParameter pname) ...@@ -2509,6 +2511,7 @@ unsigned int GetLightParameterCount(LightParameter pname)
case LightParameter::QuadraticAttenuation: case LightParameter::QuadraticAttenuation:
return 1; return 1;
default: default:
UNREACHABLE();
return 0; return 0;
} }
} }
...@@ -2519,12 +2522,14 @@ unsigned int GetMaterialParameterCount(MaterialParameter pname) ...@@ -2519,12 +2522,14 @@ unsigned int GetMaterialParameterCount(MaterialParameter pname)
{ {
case MaterialParameter::Ambient: case MaterialParameter::Ambient:
case MaterialParameter::Diffuse: case MaterialParameter::Diffuse:
case MaterialParameter::AmbientAndDiffuse:
case MaterialParameter::Specular: case MaterialParameter::Specular:
case MaterialParameter::Emission: case MaterialParameter::Emission:
return 4; return 4;
case MaterialParameter::Shininess: case MaterialParameter::Shininess:
return 1; return 1;
default: default:
UNREACHABLE();
return 0; return 0;
} }
} }
......
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