Fixed code style mistakes.

TRAC #22251 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Geoff Lang git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1672 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent c06ccb23
...@@ -37,7 +37,7 @@ RenderStateCache::~RenderStateCache() ...@@ -37,7 +37,7 @@ RenderStateCache::~RenderStateCache()
clear(); clear();
} }
void RenderStateCache::initialize(ID3D11Device* device) void RenderStateCache::initialize(ID3D11Device *device)
{ {
clear(); clear();
mDevice = device; mDevice = device;
...@@ -145,7 +145,7 @@ ID3D11BlendState *RenderStateCache::getBlendState(const gl::BlendState &blendSta ...@@ -145,7 +145,7 @@ ID3D11BlendState *RenderStateCache::getBlendState(const gl::BlendState &blendSta
blendState.colorMaskAlpha); blendState.colorMaskAlpha);
} }
ID3D11BlendState* dx11BlendState = NULL; ID3D11BlendState *dx11BlendState = NULL;
HRESULT result = mDevice->CreateBlendState(&blendDesc, &dx11BlendState); HRESULT result = mDevice->CreateBlendState(&blendDesc, &dx11BlendState);
if (FAILED(result) || !dx11BlendState) if (FAILED(result) || !dx11BlendState)
{ {
...@@ -225,7 +225,7 @@ ID3D11RasterizerState *RenderStateCache::getRasterizerState(const gl::Rasterizer ...@@ -225,7 +225,7 @@ ID3D11RasterizerState *RenderStateCache::getRasterizerState(const gl::Rasterizer
rasterDesc.MultisampleEnable = TRUE; rasterDesc.MultisampleEnable = TRUE;
rasterDesc.AntialiasedLineEnable = FALSE; rasterDesc.AntialiasedLineEnable = FALSE;
ID3D11RasterizerState* dx11RasterizerState = NULL; ID3D11RasterizerState *dx11RasterizerState = NULL;
HRESULT result = mDevice->CreateRasterizerState(&rasterDesc, &dx11RasterizerState); HRESULT result = mDevice->CreateRasterizerState(&rasterDesc, &dx11RasterizerState);
if (FAILED(result) || !dx11RasterizerState) if (FAILED(result) || !dx11RasterizerState)
{ {
...@@ -253,7 +253,7 @@ bool RenderStateCache::compareDepthStencilStates(const gl::DepthStencilState &a, ...@@ -253,7 +253,7 @@ bool RenderStateCache::compareDepthStencilStates(const gl::DepthStencilState &a,
return memcmp(&a, &b, sizeof(gl::DepthStencilState)) == 0; return memcmp(&a, &b, sizeof(gl::DepthStencilState)) == 0;
} }
ID3D11DepthStencilState* RenderStateCache::getDepthStencilState(const gl::DepthStencilState &dsState) ID3D11DepthStencilState *RenderStateCache::getDepthStencilState(const gl::DepthStencilState &dsState)
{ {
if (!mDevice) if (!mDevice)
{ {
...@@ -303,7 +303,7 @@ ID3D11DepthStencilState* RenderStateCache::getDepthStencilState(const gl::DepthS ...@@ -303,7 +303,7 @@ ID3D11DepthStencilState* RenderStateCache::getDepthStencilState(const gl::DepthS
dsDesc.BackFace.StencilPassOp = gl_d3d11::ConvertStencilOp(dsState.stencilBackPassDepthPass); dsDesc.BackFace.StencilPassOp = gl_d3d11::ConvertStencilOp(dsState.stencilBackPassDepthPass);
dsDesc.BackFace.StencilFunc = gl_d3d11::ConvertComparison(dsState.stencilBackFunc); dsDesc.BackFace.StencilFunc = gl_d3d11::ConvertComparison(dsState.stencilBackFunc);
ID3D11DepthStencilState* dx11DepthStencilState = NULL; ID3D11DepthStencilState *dx11DepthStencilState = NULL;
HRESULT result = mDevice->CreateDepthStencilState(&dsDesc, &dx11DepthStencilState); HRESULT result = mDevice->CreateDepthStencilState(&dsDesc, &dx11DepthStencilState);
if (FAILED(result) || !dx11DepthStencilState) if (FAILED(result) || !dx11DepthStencilState)
{ {
...@@ -331,7 +331,7 @@ bool RenderStateCache::compareSamplerStates(const gl::SamplerState &a, const gl: ...@@ -331,7 +331,7 @@ bool RenderStateCache::compareSamplerStates(const gl::SamplerState &a, const gl:
return memcmp(&a, &b, sizeof(gl::DepthStencilState)) == 0; return memcmp(&a, &b, sizeof(gl::DepthStencilState)) == 0;
} }
ID3D11SamplerState* RenderStateCache::getSamplerState(const gl::SamplerState &samplerState) ID3D11SamplerState *RenderStateCache::getSamplerState(const gl::SamplerState &samplerState)
{ {
if (!mDevice) if (!mDevice)
{ {
......
// //
// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2012-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -25,15 +25,15 @@ class RenderStateCache ...@@ -25,15 +25,15 @@ class RenderStateCache
RenderStateCache(); RenderStateCache();
virtual ~RenderStateCache(); virtual ~RenderStateCache();
void initialize(ID3D11Device* device); void initialize(ID3D11Device *device);
void clear(); void clear();
// Increments refcount on the returned blend state, Release() must be called. // Increments refcount on the returned blend state, Release() must be called.
ID3D11BlendState *getBlendState(const gl::BlendState &blendState); ID3D11BlendState *getBlendState(const gl::BlendState &blendState);
ID3D11RasterizerState *getRasterizerState(const gl::RasterizerState &rasterState, ID3D11RasterizerState *getRasterizerState(const gl::RasterizerState &rasterState,
bool scissorEnabled, unsigned int depthSize); bool scissorEnabled, unsigned int depthSize);
ID3D11DepthStencilState* getDepthStencilState(const gl::DepthStencilState &dsState); ID3D11DepthStencilState *getDepthStencilState(const gl::DepthStencilState &dsState);
ID3D11SamplerState* getSamplerState(const gl::SamplerState &samplerState); ID3D11SamplerState *getSamplerState(const gl::SamplerState &samplerState);
private: private:
DISALLOW_COPY_AND_ASSIGN(RenderStateCache); DISALLOW_COPY_AND_ASSIGN(RenderStateCache);
...@@ -96,7 +96,7 @@ class RenderStateCache ...@@ -96,7 +96,7 @@ class RenderStateCache
SamplerStateEqualityFunction> SamplerStateMap; SamplerStateEqualityFunction> SamplerStateMap;
SamplerStateMap mSamplerStateCache; SamplerStateMap mSamplerStateCache;
ID3D11Device* mDevice; ID3D11Device *mDevice;
}; };
} }
......
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