#include "main/texobj.h"
#include "main/hash.h"
#include "main/fbobject.h"
-#include "main/mfeatures.h"
#include "main/version.h"
#include "swrast/s_renderbuffer.h"
DRI_CONF_DESC_END
DRI_CONF_OPT_END
- DRI_CONF_OPT_BEGIN(texture_tiling, bool, true)
- DRI_CONF_DESC(en, "Enable texture tiling")
- DRI_CONF_OPT_END
-
- DRI_CONF_OPT_BEGIN(hiz, bool, true)
+ DRI_CONF_OPT_BEGIN_B(hiz, "true")
DRI_CONF_DESC(en, "Enable Hierarchical Z on gen6+")
DRI_CONF_OPT_END
- DRI_CONF_OPT_BEGIN(early_z, bool, false)
+ DRI_CONF_OPT_BEGIN_B(early_z, "false")
DRI_CONF_DESC(en, "Enable early Z in classic mode (unstable, 945-only).")
DRI_CONF_OPT_END
- DRI_CONF_OPT_BEGIN(fragment_shader, bool, true)
- DRI_CONF_DESC(en, "Enable limited ARB_fragment_shader support on 915/945.")
- DRI_CONF_OPT_END
-
DRI_CONF_SECTION_END
DRI_CONF_SECTION_QUALITY
- DRI_CONF_FORCE_S3TC_ENABLE(false)
+ DRI_CONF_FORCE_S3TC_ENABLE("false")
DRI_CONF_ALLOW_LARGE_TEXTURES(2)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_DEBUG
- DRI_CONF_NO_RAST(false)
- DRI_CONF_ALWAYS_FLUSH_BATCH(false)
- DRI_CONF_ALWAYS_FLUSH_CACHE(false)
- DRI_CONF_DISABLE_THROTTLING(false)
- DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(false)
- DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(false)
- DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED(false)
-
- DRI_CONF_OPT_BEGIN(stub_occlusion_query, bool, false)
- DRI_CONF_DESC(en, "Enable stub ARB_occlusion_query support on 915/945.")
- DRI_CONF_OPT_END
-
- DRI_CONF_OPT_BEGIN(shader_precompile, bool, true)
+ DRI_CONF_NO_RAST("false")
+ DRI_CONF_ALWAYS_FLUSH_BATCH("false")
+ DRI_CONF_ALWAYS_FLUSH_CACHE("false")
+ DRI_CONF_DISABLE_THROTTLING("false")
+ DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN("false")
+ DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false")
+ DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false")
+
+ DRI_CONF_OPT_BEGIN_B(shader_precompile, "true")
DRI_CONF_DESC(en, "Perform code generation at shader link time.")
DRI_CONF_OPT_END
DRI_CONF_SECTION_END
DRI_CONF_END;
-const GLuint __driNConfigOptions = 17;
+const GLuint __driNConfigOptions = 14;
#include "intel_batchbuffer.h"
#include "intel_buffers.h"
int cpp;
image = intel_allocate_image(format, loaderPrivate);
+ if (image == NULL)
+ return NULL;
+
if (image->format == MESA_FORMAT_NONE)
cpp = 1;
else
image->dri_format = intel_dri_format(image->format);
image->has_depthstencil = irb->mt->stencil_mt? true : false;
+ rb->NeedsFinishRenderTexture = true;
return image;
}
}
image = intel_allocate_image(format, loaderPrivate);
+ if (image == NULL)
+ return NULL;
+
cpp = _mesa_get_format_bytes(image->format);
image->region =
intel_region_alloc(intelScreen, tiling, cpp, width, height, true);
stride = parent->strides[index];
image = intel_allocate_image(dri_format, loaderPrivate);
+ if (image == NULL)
+ return NULL;
+
if (offset + height * stride > parent->region->bo->size) {
_mesa_warning(NULL, "intel_create_sub_image: subimage out of bounds");
free(image);
switch (screen->gen) {
case 7:
- if (screen->kernel_has_gen7_sol_reset) {
- screen->max_gl_core_version = 31;
- screen->max_gl_compat_version = 30;
- screen->max_gl_es1_version = 11;
- screen->max_gl_es2_version = 30;
- } else {
- screen->max_gl_core_version = 0;
- screen->max_gl_compat_version = 21;
- screen->max_gl_es1_version = 11;
- screen->max_gl_es2_version = 20;
- }
+ screen->max_gl_core_version = 31;
+ screen->max_gl_compat_version = 30;
+ screen->max_gl_es1_version = 11;
+ screen->max_gl_es2_version = 30;
break;
case 6:
screen->max_gl_core_version = 31;
screen->max_gl_es2_version = 20;
break;
case 3: {
- bool has_fragment_shader = driQueryOptionb(&screen->optionCache, "fragment_shader");
- bool has_occlusion_query = driQueryOptionb(&screen->optionCache, "stub_occlusion_query");
-
screen->max_gl_core_version = 0;
screen->max_gl_es1_version = 11;
-
- if (has_fragment_shader && has_occlusion_query) {
- screen->max_gl_compat_version = 21;
- } else {
- screen->max_gl_compat_version = 14;
- }
-
- if (has_fragment_shader) {
- screen->max_gl_es2_version = 20;
- } else {
- screen->max_gl_es2_version = 0;
- }
+ screen->max_gl_compat_version = 21;
+ screen->max_gl_es2_version = 20;
break;
}
intelScreen->deviceID = drm_intel_bufmgr_gem_get_devid(intelScreen->bufmgr);
- intelScreen->kernel_has_gen7_sol_reset =
- intel_get_boolean(intelScreen->driScrnPriv,
- I915_PARAM_HAS_GEN7_SOL_RESET);
-
if (IS_GEN7(intelScreen->deviceID)) {
intelScreen->gen = 7;
} else if (IS_GEN6(intelScreen->deviceID)) {
intelScreen->gen = 2;
}
+ if (intelScreen->gen == 7 &&
+ !intel_get_boolean(intelScreen->driScrnPriv,
+ I915_PARAM_HAS_GEN7_SOL_RESET)) {
+ fprintf(stderr, "i965 requires Kernel 3.3 or later.\n");
+ return false;
+ }
+
intelScreen->hw_has_separate_stencil = intelScreen->gen >= 6;
intelScreen->hw_must_use_separate_stencil = intelScreen->gen >= 7;