summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2009-11-12 15:39:59 -0800
committerIan Romanick <[email protected]>2009-11-12 15:43:09 -0800
commitb6b753f72728b734fc9886f4ec513ae09e6b269d (patch)
tree33766b6710622f2dbcfb5900cff41311e9437982 /src/mesa
parenta736d3f4399a99b54d6af140f2227253f2ee262b (diff)
intel: Don't check for context pointer to be NULL during extension init
Thanks to Chia-I Wu's changes to the extension function infrastructure, we no longer have to tell the loader which extensions the driver might enable. This means that intelInitExtensions will never be called with a NULL context pointer. Remove all the NULL checks. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel/intel_extensions.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c
index d8a3981b535..1682e115cc1 100644
--- a/src/mesa/drivers/dri/intel/intel_extensions.c
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c
@@ -196,27 +196,26 @@ static const struct dri_extension fragment_shader_extensions[] = {
void
intelInitExtensions(GLcontext *ctx)
{
- struct intel_context *intel = ctx?intel_context(ctx):NULL;
+ struct intel_context *intel = intel_context(ctx);
/* Disable imaging extension until convolution is working in teximage paths.
*/
driInitExtensions(ctx, card_extensions, GL_FALSE);
- if (intel == NULL || intel->ttm)
+ if (intel->ttm)
driInitExtensions(ctx, ttm_extensions, GL_FALSE);
- if (intel == NULL || IS_965(intel->intelScreen->deviceID))
+ if (IS_965(intel->intelScreen->deviceID))
driInitExtensions(ctx, brw_extensions, GL_FALSE);
- if (intel == NULL || IS_915(intel->intelScreen->deviceID)
+ if (IS_915(intel->intelScreen->deviceID)
|| IS_945(intel->intelScreen->deviceID)) {
driInitExtensions(ctx, i915_extensions, GL_FALSE);
- if (intel == NULL || driQueryOptionb(&intel->optionCache, "fragment_shader"))
+ if (driQueryOptionb(&intel->optionCache, "fragment_shader"))
driInitExtensions(ctx, fragment_shader_extensions, GL_FALSE);
- if (intel == NULL || driQueryOptionb(&intel->optionCache,
- "stub_occlusion_query"))
+ if (driQueryOptionb(&intel->optionCache, "stub_occlusion_query"))
driInitExtensions(ctx, arb_oq_extensions, GL_FALSE);
}
}