/**************************************************************************
*
- * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * Copyright 2007 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/*
* Authors:
- * Keith Whitwell <keith@tungstengraphics.com>
+ * Keith Whitwell <keithw@vmware.com>
*/
#include "i915_state_inlines.h"
/* Convinience function to check immediate state.
*/
-static INLINE void set_immediate(struct i915_context *i915,
+static inline void set_immediate(struct i915_context *i915,
unsigned offset,
const unsigned state)
{
/* I915_NEW_BLEND
*/
- LIS6 |= i915->blend->LIS6;
+ if (i915->blend)
+ LIS6 |= i915->blend->LIS6;
/* I915_NEW_DEPTH
*/
- LIS6 |= i915->depth_stencil->depth_LIS6;
+ if (i915->depth_stencil)
+ LIS6 |= i915->depth_stencil->depth_LIS6;
set_immediate(i915, I915_IMMEDIATE_S6, LIS6);
}
*/
static void upload_S7(struct i915_context *i915)
{
+#if 0
unsigned LIS7;
/* I915_NEW_RASTERIZER
*/
LIS7 = i915->rasterizer->LIS7;
-#if 0
set_immediate(i915, I915_IMMEDIATE_S7, LIS7);
#endif
}
{
int i;
- for (i = 0; i < Elements(atoms); i++)
+ for (i = 0; i < ARRAY_SIZE(atoms); i++)
if (i915->dirty & atoms[i]->dirty)
atoms[i]->update(i915);
}
struct i915_tracked_state i915_hw_immediate = {
"immediate",
update_immediate,
- ~0 /* all state atoms, becuase we do internal checking */
+ ~0 /* all state atoms, because we do internal checking */
};