summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Remove Mesa IR opcodes that existed only for NV_vertex_program.Eric Anholt2012-10-151-1/+0
| | | | | | v2: Remove dead positive() function, caught by Matt. Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
* dri drivers: Link dricommon before dynamic librariesMatt Turner2012-10-031-2/+2
| | | | | | | | | I think libtool should be handling this for us, but the build fails for Jordan because libdricommon (a static library, which uses expat) appears before -lexpat on the linker command. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Jordan Justen <jordan.l.justen@intel.com>
* build: Set visibility CFLAGS in dri/i915Matt Turner2012-10-011-0/+1
|
* i915: Don't free the intel_context structure when intelCreateContext fails.Ian Romanick2012-09-281-3/+0
| | | | | | | | | | intelDestroyContext will eventually be called, and it will clean things up. NOTE: This is a candidate for the 9.0 branch. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53618
* mesa: s/FREE/free/Brian Paul2012-09-012-4/+4
| | | | | | | v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* intel: Move RenderMode fallback func to i915 driver.Eric Anholt2012-08-282-0/+20
| | | | | | | | The Fallback field of the context struct doesn't work that way on i965, and it's the only caller of FALLBACK() in the driver. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Use a new, more specific hook for shader uniform changes.Kenneth Graunke2012-08-251-0/+8
| | | | | | | | | | | | | | | Gallium drivers and i965 don't require special notification when sampler uniforms change. They simply see the _NEW_TEXTURE and adjust their indirection tables. These drivers don't want ProgramStringNotify: it simply causes pointless recompiles. Unfortunately, i915 still requires shader recompiles and needs ProgramStringNotify. Rather than trying to fix that, simply change the hook to a new, more specific one: ShaderUniformChange. On i915, this translates to ProgramStringNotify; others simply ignore it. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
* i915: Validate API and version in i915CreateContextIan Romanick2012-08-132-1/+36
| | | | | | | v2: Use base-10 for versions like gl_context::Version. Suggested by Ken. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* intel: Rename INTEL_DEBUG=fall to INTEL_DEBUG=perf.Eric Anholt2012-08-122-3/+3
| | | | | | | | | I want to introduce some more debug output for performance surprises that includes fallbacks, but aren't necessarily software rasterization. Leave INTEL_DEBUG=fall in place for those that have used that flag before. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* intel: use _mesa_meta_Clear with OpenGL ES 1.1 v2Tapani Pälli2012-08-081-3/+3
| | | | | | | | | | | | | | | Patch changes i915 and i965 drivers to use fixed function version of meta clear when running on ES 1.1. This fixes rendering errors seen with Google Maps, Angry Birds and Gallery3D on Android platform. Change 88128516d43be5d25288ff5b64db63cda83c04b3 exposes all extensions internally to be available independent of GL flavour, therefore check against ARB_fragment_shader does not work. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50333 Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa: Move DepthMode to texture objectPauli Nieminen2012-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | GL_DEPTH_TEXTURE_MODE isn't meant to be part of sampler state based on compatibility profile specifications. OpenGL specification 4.1 compatibility 20100725 3.9.2: "... The values accepted in the pname parameter are TEXTURE_WRAP_S, TEXTURE_WRAP_T, TEXTURE_WRAP_R, TEXTURE_MIN_- FILTER, TEXTURE_MAG_FILTER, TEXTURE_BORDER_COLOR, TEXTURE_MIN_- LOD, TEXTURE_MAX_LOD, TEXTURE_LOD_BIAS, TEXTURE_COMPARE_MODE, and TEXTURE_COMPARE_FUNC. Texture state listed in table 6.25 but not listed here and in the sampler state in table 6.26 is not part of the sampler state, and remains in the texture object." The list of states is in Table 6.24 "Textures (state per texture object)" instead of 6.25 mentioned in the specification text. Same can be found from 3.3 compatibility specification. Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* intel: Make more consistent use of _mesa_is_{user,winsys}_fbo()Paul Berry2012-07-262-2/+4
| | | | | | | | | | A lot of code was still differentiating between between winsys and user fbos by testing the fbo's name against zero. This converts everything in the i915 and 965 drivers over to use _mesa_is_user_fbo() and _mesa_is_winsys_fbo(). Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i830: Fix stack corruptionChad Versace2012-07-201-1/+1
| | | | | | | | | | | | | | | Found by compiler warning: i830_texstate.c:131:28: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess] memset(state, 0, sizeof(state)); ~~~~~ ^~~~~ On 64-bit systems, memset here would write an extra 4 bytes. Note: This is a candidate for the stable branches. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* intel: Add offset field to miptreeKristian Høgsberg2012-07-111-1/+1
| | | | | | | | This lets us specify an offset into the bo where the miptree starts, which will let us set up a texture for a single plane in a planar buffer. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Eric Anholt <eric@anholt.net>
* make: Fold ASM_CFLAGS into DEFINES.Eric Anholt2012-06-211-1/+0
| | | | | | Every place that uses ASM_FLAGS already uses DEFINES. Not including it in DEFINES is just a way to screw up potential users, as I've done several times while working on the build system.
* i830: Fix crash for GL_STENCIL_TEST in i830Enable()Kurt Roeckx2012-05-291-1/+1
| | | | | | | | | | | commit 87f12bb2d95236c7b025d1a8be56b5ab1683d702 tried to fix rb->mt being NULL, but change this case wrong. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965: Gut the separate OpenGL ES extension enabling.Kenneth Graunke2012-05-232-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | We should just set the bits of functionality that we support; the GL/ES1/ES2 flags in extensions.c will take care of advertising the appropriate extensions for the current API. This enables the GL_EXT_texture_compression_dxt1 extension on ES1/ES2 when libtxc_dxtn is installed or the force_s3tc driconf option is set. The main extension code set this up properly, but the ES-specific code failed to do so. Otherwise, the extension strings reported by es1_info, es2_info, and glxinfo all remain the same. This patch manually disables the ARB_framebuffer_object bit on ES to preserve the behavior of 1c0f5d8324c4db2720247989ddc4a45315b55a85. v2: Rebase, fix the i915 Makefile, and unconditionally set the OES_draw_texture bit as core Mesa will only apply it to ES1 now. Tested-by: Daniel Charles <daniel.charles@intel.com> [v1] Reviewed-by: Chad Versace <chad.versace@linux.intel.com> [v1] Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
* i915: Drop gen4+ code from the forked clear code.Eric Anholt2012-05-231-10/+1
| | | | | Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
* intel: Fork the intel_clear.c file between i915 and i965.Eric Anholt2012-05-231-1/+203
| | | | | | | | This logic is wasted on i965 when we want to just always do GLSL tri clears. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
* intel: use _mesa_is_winsys/user_fbo() helpersBrian Paul2012-05-012-4/+6
| | | | Reviewed-by: Eric Anholt <eric@anholt.net>
* autoconf: pass -Wall to automakeDylan Noblesmith2012-04-291-2/+2
| | | | | | | And fix these warning that appear at autoreconf time: "`:='-style assignments are not portable" v2: Fix the recently-converted-to-automake r600.
* i915: set SPRITE_POINT_ENABLE bit correctlyYuanhan Liu2012-04-094-12/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When SPRITE_POINT_ENABLE bit is set, the texture coord would be replaced, and this is only needed when we called something like glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE). And more, we currently handle varying inputs as texture coord, we would be careful when setting this bit and set it just when needed, or you will find the value of varying input is not right and changed. Thus we do set SPRITE_POINT_ENABLE bit only when all enabled tex coord units need do CoordReplace. Or fallback is needed to make sure the rendering is right. With handling the bit setup at i915_update_sprite_point_enable(), we don't need the relative code at i915Enable then. This patch would _really_ fix the webglc point-size.html test case and of course, not regress piglit point-sprite and glean-pointSprite testcase. NOTE: This is a candidate for stable release branches. v2: fallback just when all enabled tex coord units need do CoordReplace (Eric) v3: move the sprite point validate code at I915InvalidateState (Eric) v4: sprite point enable bit update based on _NEW_PROGRAM, too add relative _NEW-state comments to show what state is being used(Eric) Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
* intel: Drop the INTEL_STRICT_CONFORMANCE environment variable.Eric Anholt2012-03-201-11/+1
| | | | | | | | | If you want to test the graphics driver, you want to test it under the conditions that users will see, not some set of additional fallbacks. If you want to test swrast, run the swrast driver (or no_rast=true) instead. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* Add Makefile.in to toplevel .gitignoreKenneth Graunke2012-03-201-1/+0
| | | | | | | To avoid redundancies, this patch also removes Makefile.in from the other .gitignore files. Acked-by: Eric Anholt <eric@anholt.net>
* Add .deps/, .libs/, and *.la to toplevel .gitignorePaul Berry2012-03-201-3/+0
| | | | | | | To avoid redundancies, this patch also removes .deps, .libs, and *.la from .gitignore files in subdirectories. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i915: fallback for NPOT cubemap textureYuanhan Liu2012-03-191-0/+22
| | | | | | | | | | | | | | | | | Although some hardware support NPOT cubemap, but it seems we don't know the right layout for NPOT cubemap. Thus seems we need do fallback for other platforms as well. See comments inline the code for more detailed info. v2: give a more detailed info about why we need fallback for other platfroms as well. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46666 NOTE: This is a candidate for stable release branches. Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
* i915: remove occurances of _DD_NEW_x flagsBrian Paul2012-03-121-7/+5
| | | | | | | | Just use the corresponding _NEW_x flags intead. The _DD_NEW_x flags will be removed in a following patch. Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* i915: move the FALLBACK_DRAW_OFFSET check outside the drawing rect checkYuanhan Liu2012-03-071-4/+3
| | | | | | | | | | | | | We have to do fallback when the 'Clipped Drawing Rectangle X/Y Max' exceed the hardware's limit no matter the drawing rectangle offset changed or not. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46665 NOTE: This is a candidate for stable release branches. Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* i915: fix wrong rendering of gl_PointSize on PineviewYuanhan Liu2012-03-051-0/+4
| | | | | | | | | | | | | | | | | | The current code would ignore the point size specified by gl_PointSize builtin variable in vertex shader on Pineview. This patch servers as fixing that. This patch fixes the following issues on Pineview: webglc: https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/rendering/point-size.html piglit: glsl-vs-point-size NOTE: This is a candidate for stable release branches. v2: pick Eric's nice tip for fixing this issue in hardware rendering. v3: the last arg of EMIT_ATTR specify the size in _byte_. (Eric) Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* i915: Fix i830 polygon stipple from PBOs.Kurt Roeckx2012-03-021-1/+7
| | | | | | | | | | | This is a direct port of the i915 patch in a856da63247a4b403f6350914f732e14d1530ed1. Fixes glean's pbo test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41372 Reviewed-by: Eric Anholt <eric@anholt.net> NOTE: This is a candidate for release branches.
* i915: Compute maximum number of verts using the actual batchbuffer size.Kurt Roeckx2012-03-021-3/+3
| | | | | | | | | | | We were looking at the size of batch.map for how big the batchbuffer was, but on 865 we just use a single-page batchbuffer due to hardware limits. v2: Removed check for sizeof map < bo->size, since that's always false. [change by anholt] NOTE: This is a candidate for release branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41495
* i830: Compute initial number of vertices from remaining batch spaceChris Wilson2012-03-021-5/+11
| | | | | | | | | | | | | In order to prevent an overflow of the batch buffer when emitting triangles, we need to limit the initial primitive to fit within the current batch. To do we need to measure the remaining space and thence compute the maximum number of vertices that fit into that space. Reported-by: Kurt Roeckx <kurt@roeckx.be> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41495 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Eric Anholt <eric@anholt.net> NOTE: This is a candidate for release branches.
* dri/i915: Fix off-by-one in i830 clip region size.Alban Browaeys2012-03-021-2/+2
| | | | | | | | | | | | | | | | | | The hardware, like i915, uses an inclusive bounds on min and max for the drawing rectangle, but we were providing a number for exclusive. The number of bits used by the hardware only covers this value going up to the maximum size, so when we programmed 2048 as the maximum inclusive X, it saw a maximum X of 0 and clipped all rendering. This caused rendering failures in gnome-shell. Fixes piglit fbo-maxsize. v2: dropped changes to the blitter, which does use an exclusive x2, y2. [change by anholt] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45558 Reviewed-by: Eric Anholt <eric@anholt.net> NOTE: This is a candidate for release branches.
* i915: Fix piglit fbo-nodepth-test on i830.Eric Anholt2012-03-022-3/+8
| | | | | | | | | This is a direct port of fc4fba52cf7e9616c70dd76b4d6bdba6582e157b from i915, and fixes GPU hangs when running piglit. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41372 Reviewed-by: Eric Anholt <eric@anholt.net> NOTE: This is a candidate for release branches.
* mesa: remove last of MAX_WIDTH, MAX_HEIGHTBrian Paul2012-02-241-1/+0
| | | | | Define new MAX_VIEWPORT_WIDTH/HEIGHT and MAX_RENDERBUFFER_SIZE values instead.
* i915: Fix type of "specoffset" variable.Paul Berry2012-02-141-1/+1
| | | | | | | | | | | | | | | | | Commit 2e5a1a2 (intel: Convert from GLboolean to 'bool' from stdbool.h.) converted the "specoffset" local variable (in intel_tris.c) from a GLboolean to a bool. However, GLboolean was the wrong type for specoffset--it should have been a GLuint (to match the declaration of specoffset in struct intel_context). This patch changes specoffset to the proper type. Fixes piglit test general/two-sided-lighting-separate-specular. This is a candidate for stable branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45917 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* intel: Use libdrm's decode functionality instead of the gpu-tools copy.Eric Anholt2012-01-301-1/+0
| | | | | | While typing out the new decode, I added a fallback mode for dumping when we fail to re-map the BO after execution. This should get us a minimal dump when trying to dump a batch that results in a GPU hang.
* dri: don't link with DRICORE_LIB_DEPSMatt Turner2012-01-281-1/+0
| | | | DRI_LIB_DEPS is sufficient since it includes DRICORE_LIB_DEPS
* intel: Pass the gl_renderbuffer to render_target_supported() vtable method.Eric Anholt2012-01-272-2/+8
| | | | | | I'm going to want to go looking at it for an integer texture fix. NOTE: This is a candidate for the 8.0 branch.
* dri: Move the compile of the common files to a convenience library.Eric Anholt2012-01-261-10/+3
| | | | Reviewed-by: Matt Turner <mattst88@gmail.com>
* i915: Fix driver after automakeification.Eric Anholt2012-01-261-1/+9
|
* intel: use intel_rb_format() to get renderbuffer formatBrian Paul2012-01-242-6/+6
| | | | This will make future changes cleaner and less invasive.
* automake: src/mesa/drivers/dri/i915Matt Turner2012-01-205-32/+70
|
* intel: Set depth to 6 for cubemapsIan Romanick2012-01-181-2/+2
| | | | | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41216 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43212 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43250 Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: Jin Yang <jin.a.yang@intel.com>
* i915: Convert to use GLbitfield64 directly.Mathias Fröhlich2011-12-282-14/+12
| | | | | Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de> Reviewed-by: Brian Paul <brianp@vmare.com>
* mesa: Make gl_program::InputsRead 64 bits.Mathias Fröhlich2011-11-291-2/+2
| | | | | | | | | Make gl_program::InputsRead a 64 bits bitfield. Adapt the intel and radeon driver to handle a 64 bits InputsRead value. Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de> Reviewed-by: Eric Anholt <eric@anholt.net>
* android: pass -std=c99 by defaultChia-I Wu2011-11-261-4/+0
| | | | | Several modules expect a C99 compiler already. It is also the default for Makefile build.
* i915: Fix complete texturing regression since 27505a105aEric Anholt2011-11-231-0/+2
| | | | | | I had notes to myself to test gen3 and gen4, and then I tested gen4 and called it good. Turns out I forgot to actually call the new function on gen3.
* i915: Fix build since hiz merge.Eric Anholt2011-11-236-24/+29
| | | | | | | | v2: Guard against rb->mt being NULL, since we may enter the draw regions path before intel_prepare_render() has been called to set them. Reviewed-by: Chad Versace <chad.versace@linux.intel.com> (v1)
* i915: Move the texture format setup for this driver out of shared code.Eric Anholt2011-11-222-0/+51
| | | | | | | The i965 driver is now enabling all of these formats on its own from the surface format table. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>