aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel
Commit message (Collapse)AuthorAgeFilesLines
* intel: make intel_texture_image a subclass of swrast_texture_imageBrian Paul2011-09-178-93/+101
| | | | | We need to subclass swrast_texture_image because if we use swrast for fallback rendering, we'll need to have swrast_texture_image objects.
* mesa: add new DeleteTextureImage() driver hookBrian Paul2011-09-171-0/+8
| | | | | | Matches the NewTextureImage() hook. With new subclasses of gl_texture_image coming we need a new hook to properly delete objects of those subclasses.
* Change strerror(ret) to strerror(-ret).Eugeni Dodonov2011-09-151-1/+1
|
* mesa/colormac: introduce inline helper for 4 unclamped float to ubyte.Dave Airlie2011-09-141-4/+1
| | | | | | | | | This introduces an UNCLAMPED_FLOAT_TO_UBYTE x 4 inline function, as suggested by Brian. It uses it in a few places I noticed from previous color changes, and also some core mesa places. I haven't updated other places yet. Signed-off-by: Dave Airlie <[email protected]>
* mesa: introduce a clear color union to be used for int/unsigned buffersDave Airlie2011-09-141-5/+5
| | | | | | | | | | This introduces a new gl_color_union union and moves the current ClearColorUnclamped to use it, it removes current ClearColor completely and renames CCU to CC, then all drivers are modified to expected unclamped floats instead. also fixes st to use translated color in one place it wasn't. Signed-off-by: Dave Airlie <[email protected]>
* dri: Remove all extension enabling utility functionsIan Romanick2011-09-091-6/+0
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Move S3TC extension enable bits to intel_extensions.cIan Romanick2011-09-092-7/+8
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Enable extensions by just setting the flagsIan Romanick2011-09-091-191/+98
| | | | | | | | | | | | Core Mesa already does the dispatch offset remapping for every function that could possibly ever be supported. There's no need to continue using that cruft in the driver. EXT_blend_logic_op is removed from the list of extensions because blend factors and separate blend equations are not handled correctly. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Silence "intel/intel_fbo.h:105:4: warning: comparison of unsigned ↵Ian Romanick2011-09-091-3/+3
| | | | | | | | | | | expression < 0 is always false" The test was of an enum, attIndex, which should be unsigned. The explicit check for < 0 was replaced with a cast to unsigned in an assertion that attIndex is less than the size of the array it will be used to index. Reviewed-by: Eric Anholt <[email protected]>
* intel: Silence several "warning: unused parameter"Ian Romanick2011-09-091-0/+2
| | | | | | | Trivially silence the compiler by adding '(void) foo;' for each unused parameter. These parameters could not be removed. They are part of interface used elsewhere in Mesa, and some of the other customers actually use these parameters.
* intel: Silence several "warning: unused parameter"Ian Romanick2011-09-091-13/+4
| | | | | | | | | | | | | | | | | | | | | The internalFormat, format, and type parameters were not used by either try_pbo_upload or try_pbo_zcopy, so remove them. The width parameter was also not used by try_pbo_zcopy (because it doesn't actually copy anything), so remove it too. Eric Anholt notes: The current structure of this code is so hateful I can't bring myself to say anything about whether changing the current code is good or bad. I have a dream that one call would try to make a surface (miptree/region) out of the PBO, then we'd see about whether it matches up nicely and zero-copy/blit using that. That would be reusable for texsubimage, which is currently awful in this respect. At some point we should revisit this code with pitchforks and torches.
* intel: Silence "warning: unused parameter ‘depth0’"Ian Romanick2011-09-093-7/+4
| | | | | | | | | | The depth0 parameter was not used in intel_miptree_create_for_region, so remove it. All of the places that call this function, pass 1 for that parameter, and the place where it looks like it should have been used (the call to intel_miptree_create_internal) also had 1 hard coded. Reviewed-by: Eric Anholt <[email protected]>
* intel: Silence "warning: unused parameter ‘target’"Ian Romanick2011-09-093-13/+5
| | | | | | | | | The GLenum target parameter was not used in intel_copy_texsubimage, so remove it. Also remove the GLenum internalFormat parameter. Each caller just copied this out of the intel_texture_image that is already passed to intel_copy_texsubimage. Reviewed-by: Eric Anholt <[email protected]>
* intel: Silence several "warning: unused parameter"Ian Romanick2011-09-094-23/+13
| | | | | | The intel_context and tiling parameters were not used by any if the i9[14]5_miptree_layout or the functions they call, and the tiling parameter was not used by brw_miptree_layout. Remove the unnecessary parameters.
* intel: Silence "warning: unused parameter ‘fb’"Ian Romanick2011-09-094-7/+7
| | | | | | The gl_framebuffer was not used in intel_draw_buffer, so remove it. Reviewed-by: Eric Anholt <[email protected]>
* intel: Silence "warning: unused parameter ‘intel’"Ian Romanick2011-09-093-11/+7
| | | | The intel_context was not used in any of these functions, so remove it.
* intel: Silence several "warning: unused parameter"Ian Romanick2011-09-091-22/+38
| | | | | | | | | Also clean-up some of the naming, etc. in intel_buffer_object_purgeable. 'intel' is usually used as the name of an intel_context pointer, and intel_obj is usually used as the name of an intel_*_obj pointer. These changes were suggested by Eric Anholt. Reviewed-by: Eric Anholt <[email protected]>
* intel: Silence many "intel_batchbuffer.h:97:39: warning: comparison between ↵Ian Romanick2011-09-091-2/+3
| | | | | | | | | | | | | | | | | | | | | signed and unsigned integer expressions" v2: Remove the assertion in intel_batchbuffer_space: assert((intel->batch.state_batch_offset - intel->batch.reserved_space) >= intel->batch.used*4); After reviewing all the places where this is called, I'm (fairly) comfortable that this assertion was redundant. Having the assertion adds ~20KiB to a driver build: text data bss dec hex filename 903173 26392 1552 931117 e352d i965_dri.so 924093 26392 1552 952037 e86e5 i965_dri.so Based on feedback from Eric Anholt. Reviewed-by: Eric Anholt <[email protected]>
* intel: add support for __DRI_IMAGE_FORMAT_ABGR8888Chia-I Wu2011-09-092-0/+21
| | | | | | | | | | | It maps to MESA_FORMAT_RGBA8888_REV. Surfaces of the format can only be sampled from but not render to. Only i915 is tested. Reviewed-by: Eric Anholt <[email protected]> [olv: add a check in intel_image_target_renderbuffer_storage]
* intel: fix build errorYuanhan Liu2011-09-031-1/+1
| | | | | | | | Fix a build error introduced by commit 6862b54f: i965_dri.so.tmp: undefined reference to `strerr' Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* intel: Give an explanation why we are exiting for debugging.Eugeni Dodonov2011-09-021-0/+1
| | | | | | | | | | This could happen in 3 different cases, and ERRNO can explain what happened. First case would be EIO (gpu hang), second EINVAL (something is wrong inside the batch), and we also discovered that sometimes it happens with ENOSPACE. All of those cases are different it it could be worth to at least know what happened. Signed-off-by: Eugeni Dodonov <[email protected]>
* intel: Upload batchbuffer contents even if INTEL_NO_HW is set.Eric Anholt2011-09-021-8/+8
| | | | | It is useful for debugging to dump batchbuffers while not actually executing them.
* intel: fix GLESv1 supportChia-I Wu2011-09-013-8/+58
| | | | | | | Add intelInitExtensionsES1 to enable required and optional GLESv1 extensions. Reviewed-by: Ian Romanick <[email protected]>
* intel: rename intel_extensions_es2.c to intel_extensions_es.cChia-I Wu2011-09-011-0/+0
| | | | | | We'd like to add intelInitExtensionsES1 to it later. Reviewed-by: Ian Romanick <[email protected]>
* intel: Restructure TexSubImage as just the 2D implementation and blit func.Eric Anholt2011-08-301-100/+114
| | | | | | | | | | | Fixes a segfault in piglit copyteximage where I accidentally removed the dst_bo setup in the previous cleanup. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40474 Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Tested-by: Sean McNamara <[email protected]> Tested-by: Ian Romanick <[email protected]>
* intel: Remove the passthrough TexSubImage[13]D functions.Eric Anholt2011-08-301-42/+0
| | | | | | | | | All we need for these is _mesa_store_texsubimage[13]d(), since we don't do the blit path. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Tested-by: Ian Romanick <[email protected]>
* intel: Rely on Mesa core for the non-blit glTexSubImage* implementation.Eric Anholt2011-08-291-84/+65
| | | | | | It uses MapTextureImage() now, so we don't need our own mapping. Reviewed-by: Brian Paul <[email protected]>
* intel: Remove our custom _mesa_store_compressed_texsubimage2d().Eric Anholt2011-08-291-83/+33
| | | | | | | Now that Mesa core knows how to map teximages, we no longer needed the compressed paths here. Reviewed-by: Brian Paul <[email protected]>
* intel: Add implementation of MapTextureImage/UnmapTextureImage.Eric Anholt2011-08-293-2/+92
| | | | Reviewed-by: Brian Paul <[email protected]>
* Rename some driver FreeTextureImageData functions to FreeTextureImageBuffer.Eric Anholt2011-08-291-2/+3
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Rename FreeTexImageData to FreeTextureImageBuffer.Eric Anholt2011-08-292-2/+2
| | | | | | | | This was produced by sed, except for one hunk in driverfuncs.c where trailing whitespace was dropped. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* intel: use new gl_texture_image:Face, Level fieldsBrian Paul2011-08-249-51/+34
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: Eliminate dd_function_table::MapBufferIan Romanick2011-08-232-65/+10
| | | | | | | | | | Replace all calls to dd_function_table::MapBuffer with appropriate calls to dd_function_table::MapBufferRange, then remove all the cruft. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove target parameter from dd_function_table::FlushMappedBufferRangeIan Romanick2011-08-231-1/+1
| | | | | | | | | | No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* intel: Correctly check for read-only mappings in intel_bufferobj_map_rangeIan Romanick2011-08-231-1/+3
| | | | | | | | | | The old code was an obvious cut-and-paste fail from intel_bufferobj_map. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
* mesa: Remove target parameter from dd_function_table::MapBufferRangeIan Romanick2011-08-231-1/+1
| | | | | | | | | | No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove target parameter from dd_function_table::GetBufferSubDataIan Romanick2011-08-231-1/+0
| | | | | | | | | | No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove target parameter from dd_function_table::BufferSubDataIan Romanick2011-08-231-1/+0
| | | | | | | | | | No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove target parameter from dd_function_table::MapBufferIan Romanick2011-08-232-8/+4
| | | | | | | | | | No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove target parameter from dd_function_table::UnmapBufferIan Romanick2011-08-232-10/+7
| | | | | | | | | | No driver used that parameter, and most drivers ended up with a bunch of unused-parameter warnings because it was there. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* intel: Abort when DRI2 separate stencil handshake failsChad Versace2011-08-221-0/+7
| | | | | | | | | | When intel_context requires separate stencil but the DRI2 separate stencil handshake fails, then abort and emit an error instructing the user to upgrade the DDX to 2.16.0. CC: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* intel: GetBuffer fixBen Widawsky2011-08-101-1/+6
| | | | | | | | | | After copy buffer on preGEN6, it is necessary to wait for the blit to complete before returning data to the user. This should fix the piglit test: copy_buffer_coherency (pre-GEN6). Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Fix unused variable warning.Eric Anholt2011-08-021-1/+0
|
* i965: Remove the now unused intel_renderbuffer::draw_offset field.Kenneth Graunke2011-07-282-2/+0
| | | | | | | The previous commit removed the last use of this field. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Check actual tile offsets in Gen4 miptree workaround.Kenneth Graunke2011-07-281-2/+17
| | | | | | | | | | | | | | | | | | | | | | | The purpose of the (irb->draw_offset & 4095) != 0 check was to ensure that we don't have XYy offsets into a tile, since Gen4 hardware doesn't support that. However, it's insufficient: there are cases where draw_offset & 4095 is 0 but we still have a Y-offset. This leads to an assertion failure in brw_update_renderbuffer_surface with tile_y != 0. Instead, simply call intel_renderbuffer_tile_offsets to compute the actual X/Y offsets and check if either are non-zero. This makes both the workaround and the assertion check the same things. Fixes piglit test fbo-generatemipmap-formats, and should also fix bugs #34009 and #39487. NOTE: This is a candidate for stable release branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34009 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39487 Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Chad Versace <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Use 3D clears on gen6+ to avoid inter-ring synchronization.Eric Anholt2011-07-251-2/+2
| | | | Improves firefox-talos-gfx around 5%.
* i965: Emit texture cache flushes on gen6 along with render cache flushes.Eric Anholt2011-07-251-0/+1
| | | | | | | | | | | | | | It turns out that internally the texture cache gets flushed in a couple of cases, particularly around 2D operations mixed with 3D. In almost all cases one of those happens between rendering to an FBO-attached texture and rendering from that texture. However, as of the next patch, glean tfbo (and the new fbo-flushing-2 test) would manage to get stale texture values because one of those flushes didn't occur. The intention of this code was always to get the render cache cleared and ready to be used from the sampler cache (and it does on <= gen4), so this just catches gen5 up. This patch was also tested to fix fbo-flushing on gen7.
* Merge branch 'remove-copyteximage-hook'Brian Paul2011-07-211-97/+0
|\
| * intel: remove intelCopyTexImage1D/2D()Brian Paul2011-07-191-97/+0
| |
* | i965: Enable the PIPE_CONTROL workaround workaround out of paranoia.Eric Anholt2011-07-202-3/+29
| | | | | | | | | | | | | | | | There's scary stuff going on in PIPE_CONTROL internals, and if the BSpec says to do this to make PIPE_CONTROL work, I'll go ahead and do it because we'll probably never be able to debug it after the fact. v2: Use stall at scoreboard instead of depth stall, as noted by Ken.