summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Change save_attrib_data() to return booleanJuha-Pekka Heikkila2013-12-181-1/+3
| | | | | | | Change save_attrib_data() to return true/false depending on success. Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add API/extension checks for 3-component texture buffer formatsBrian Paul2013-12-181-7/+14
| | | | | | | | | | The GL_RGB32F, GL_RGB32UI and GL_RGB32I texture buffer formats are only supposed to be allowed if the GL_ARB_texture_buffer_object_rgb32 extension is supported. Note that the texture buffer extensions require a core profile. This patch adds those checks. Fixes the soon-to-be-added arb_clear_buffer_object-negative-bad-internalformat piglit test.
* mesa: 78-column wrapping in extensions.cBrian Paul2013-12-181-6/+8
|
* mesa: Cleanup mesa/main/bufferobj.hPi Tabred2013-12-181-14/+45
| | | | | | Column wrapping and space between lines. Reviewed-by: Brian Paul <[email protected]>
* Add ARB_clear_buffer_object to list of supported extensionsPi Tabred2013-12-181-0/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: plug in default buffer object driver functionsBrian Paul2013-12-181-0/+3
| | | | | In particular, this plugs in the new ClearBufferSubData() fallback driver function.
* mesa: Implement functions for clear_buffer_object extensionsPi Tabred2013-12-182-0/+283
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Modify get_buffer() to allow for a variable error codePi Tabred2013-12-181-16/+28
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Add bufferobj_range_mapped functionPi Tabred2013-12-181-32/+59
| | | | | | | | | | | Add function to test if the buffer is already mapped and if so, if the mapped range overlaps the given range. Modify the _mesa_InvalidateBufferSubData function to use the new function. Enable buffer_object_subdata_range_good() to use bufferobj_range_mapped Reviewed-by: Brian Paul <[email protected]>
* mesa: get_texbuffer_format(): differentiate between core and compat contextPi Tabred2013-12-181-80/+87
| | | | | | | | alpha, lumincance and intensity formats are illegal in a core context. Add a check to return MESA_FORMAT_NONE if one of those is requested within a core context. Reviewed-by: Brian Paul <[email protected]>
* mesa: Modify format validation to check for extension not context versionPi Tabred2013-12-181-7/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Make validate_texbuffer_format function available externallyPi Tabred2013-12-182-3/+8
| | | | | | | - change storage class from static to extern - rename validate_texbuffer_format to _mesa_validate_texbuffer_format Reviewed-by: Brian Paul <[email protected]>
* mesa: Add infrastructure for GL_ARB_clear_buffer_objectPi Tabred2013-12-182-2/+8
| | | | | | | | | - add xml file for extension - add reference in gl_API.xml - add pointer to device driver function table (dd.h) - update dispatch_sanity.cpp Reviewed-by: Brian Paul <[email protected]>
* main: Move MESA_SHADER_TYPES outside of gl_shader_type enum.Paul Berry2013-12-171-1/+2
| | | | | | This will avoid spurious compiler warnings in the patch that follows. Reviewed-by: Brian Paul <[email protected]>
* glsl: Don't return bad values from _mesa_shader_type_to_index.Paul Berry2013-12-171-1/+1
| | | | | | | | | | This will avoid compiler warnings in the patch that follows. There should be no user-visible effect because the change only affects the behaviour when an invalid enum is passed to _mesa_shader_type_to_index(), and that can only happen if there is a bug elsewhere in Mesa. Reviewed-by: Brian Paul <[email protected]>
* swrast: silence driContextSetFlags() parameter type warningBrian Paul2013-12-171-1/+1
|
* i965: Treat Haswell as 75 in the surface format table.Kenneth Graunke2013-12-131-1/+1
| | | | | | | Much like we do for G45. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: fix texture view use of _mesa_get_tex_image()Chris Forbes2013-12-141-2/+7
| | | | | | | | | | | | | | The target parameter to _mesa_get_tex_image() is a target enum, not an index. When we're setting up faces for a cubemap, it should be CUBE_MAP_POSITIVE_X .. CUBE_MAP_NEGATIVE_Z; for all other targets it should be the same as the texobj's target. Fixes broken cubemaps [had only +X face but claimed to have all] produced by glTextureView, which then caused various crashes in the driver when we tried to use them. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965/fs: add support for gl_SampleMaskIn[]Chris Forbes2013-12-145-1/+30
| | | | | | | | v2: - add assert so we don't run into trouble on Gen6. - adjust for Tapani's rearrangement of ir_variable Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add SYSTEM_VALUE_SAMPLE_MASK_INChris Forbes2013-12-141-6/+8
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: document _mesa_texstore() return valueBrian Paul2013-12-131-0/+1
|
* st/mesa: only set up sampler compare mode for depth texturesBrian Paul2013-12-131-9/+12
| | | | | | | | | | | The GL_ARB_shadow spec says the shadow compare mode should have no effect when sampling a color texture. As it was, it was up to drivers to check for that (softpipe, llvmpipe, svga and probably the rest don't do that). Note: it looks like DX10 allows shadow compare with some non-depth formats, so this case really should be handled in the state tracker. Reviewed-by: Roland Scheidegger <[email protected]>
* st/mesa: add const qualifiers in sampler validation codeBrian Paul2013-12-132-3/+9
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* st/mesa: add const qualifier to st_translate_color()Brian Paul2013-12-132-4/+4
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* st/mesa: simplify integer texture checkBrian Paul2013-12-131-5/+2
| | | | | | | Just use the gl_texture_object::_IsInteger field instead of computing it from scratch. Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: s/uint/GLuint/ to fix MSVC errorBrian Paul2013-12-131-1/+1
|
* mesa: Update TexStorage to support ARB_texture_viewCourtney Goeltzenleuchter2013-12-132-2/+9
| | | | | | | | | | | Call TextureView helper function to set TextureView state appropriately for the TexStorage calls. Misc updates from review feedback. Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add texture_view helper function for TexStorageCourtney Goeltzenleuchter2013-12-132-0/+65
| | | | | | | | | Add helper function to set texture_view state from TexStorage calls. Include review feedback. Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Fill out ARB_texture_view entry pointsCourtney Goeltzenleuchter2013-12-131-1/+538
| | | | | | | | | | | | | | | | Add Mesa TextureView logic. Incorporate feedback on ARB_texture_view: - Add S3TC VIEW_CLASSes to compatibility table - Use existing _mesa_get_tex_image - Clean up error strings - Use bool instead of GLboolean for internal functions - Split compound level & layer test into individual tests - eliminate helper macro for VIEW_CLASS table - do not call driver if ptr null. Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: consolidate multiple next_mipmap_level_sizeCourtney Goeltzenleuchter2013-12-133-26/+11
| | | | | | | | | Refactor to make next_mipmap_level_size defined in mipmap.c a _mesa_ helper function that can then be used by texture_view Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add driver entry point for ARB_texture_viewCourtney Goeltzenleuchter2013-12-132-0/+8
| | | | | | Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: ARB_texture_view get parametersCourtney Goeltzenleuchter2013-12-131-4/+56
| | | | | | | | | | | | | | | Add support for ARB_texture_view get parameters: GL_TEXTURE_VIEW_MIN_LEVEL GL_TEXTURE_VIEW_NUM_LEVELS GL_TEXTURE_VIEW_MIN_LAYER GL_TEXTURE_VIEW_NUM_LAYERS Incorporate feedback regarding when to allow query of GL_TEXTURE_IMMUTABLE_LEVELS. Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: update texture object for ARB_texture_viewCourtney Goeltzenleuchter2013-12-131-0/+5
| | | | | | | | Add state needed by glTextureView to the gl_texture_object. Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Tracking for ARB_texture_view extensionCourtney Goeltzenleuchter2013-12-132-0/+2
| | | | | | Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add API definitions for ARB_texture_viewCourtney Goeltzenleuchter2013-12-135-1/+107
| | | | | | | | | | Stub in glTextureView API call to go with the glTextureView API xml definition. Includes dispatch test for glTextureView Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Fix error code generation in glBeginConditionalRender()Anuj Phogat2013-12-131-1/+3
| | | | | | | | | | | | | This patch changes the error condition to satisfy below statement from OpenGL 4.3 core specification: "An INVALID_OPERATION error is generated if id is the name of a query object with a target other SAMPLES_PASSED, ANY_SAMPLES_PASSED, or ANY_SAMPLES_PASSED_CONSERVATIVE, or if id is the name of a query currently in progress." Cc: [email protected] Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* dri_util: Don't assume __DRIcontext->driverPrivate is a gl_contextKristian Høgsberg2013-12-1314-10/+34
| | | | | | | | | | | | | | | | | The driverPrivate pointer is opaque to the driver and we can't assume it's a struct gl_context in dri_util.c. Instead provide a helper function to set the struct gl_context flags from the incoming DRI context flags. v2 (idr): Modify the other classic drivers to also use driContextSetFlags. I ran all the piglit GLX_ARB_create_context tests with i965 and classic swrast without regressions. Signed-off-by: Kristian Høgsberg <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ian Romanick <[email protected]> [v1] Reviewed-by: Eric Anholt <[email protected]> Tested-by: Ilia Mirkin <[email protected]> [v1 on Gallium nouveau] Cc: "10.0" <[email protected]>
* swrast* (gallium, classic): add MESA_copy_sub_buffer support (v3)Dave Airlie2013-12-133-1/+54
| | | | | | | | | | | | | | | | | | | | | | | This patches add MESA_copy_sub_buffer support to the dri sw loader and then to gallium state tracker, llvmpipe, softpipe and other bits. It reuses the dri1 driver extension interface, and it updates the swrast loader interface for a new putimage which can take a stride. I've tested this with gnome-shell with a cogl hacked to reenable sub copies for llvmpipe and the one piglit test. I could probably split this patch up as well. v2: pass a pipe_box, to reduce the entrypoints, as per Jose's review, add to p_screen doc comments. v3: finish off winsys interfaces, add swrast classic support as well. Reviewed-by: Jose Fonseca <[email protected]> Signed-off-by: Dave Airlie <[email protected]> swrast: add support for copy_sub_buffer
* st/mesa: set correct PIPE_CLEAR_COLORn flagsMarek Olšák2013-12-121-11/+26
| | | | This also fixes the clear_with_quad function for glClearBuffer.
* st/mesa: fix glClear with multiple colorbuffers and different formatsMarek Olšák2013-12-121-24/+9
| | | | Cc: 10.0 9.2 9.1 <[email protected]>
* mesa: fix interpretation of glClearBuffer(drawbuffer)Marek Olšák2013-12-121-6/+25
| | | | | | | | This corresponding piglit tests supported this incorrect behavior instead of pointing at it. Reviewed-by: Ian Romanick <[email protected]> Cc: 10.0 9.2 9.1 <[email protected]>
* glsl: move variables in to ir_variable::data, part IITapani Pälli2013-12-129-54/+55
| | | | | | | | | | | | | This patch moves following bitfields and variables to the data structure: explicit_location, explicit_index, explicit_binding, has_initializer, is_unmatched_generic_inout, location_frac, from_named_ifc_block_nonarray, from_named_ifc_block_array, depth_layout, location, index, binding, max_array_access, atomic Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: move variables in to ir_variable::data, part ITapani Pälli2013-12-1210-35/+35
| | | | | | | | | | This patch moves following bitfields in to the data structure: used, assigned, how_declared, mode, interpolation, origin_upper_left, pixel_center_integer Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: introduce data section to ir_variableTapani Pälli2013-12-121-2/+2
| | | | | | | | Data section helps serialization and cloning of a ir_variable. This patch includes the helper bits used for read only ir_variables. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: fix a typo in glDetachShader error messageTapani Pälli2013-12-121-1/+1
| | | | | Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: fix readback regression since inversion fixDave Airlie2013-12-101-1/+1
| | | | | | | | | | | | | | | This readback from the frontbuffer with swrast was broken, that bug just made it more obviously broken, this fixes it by inverting the sub image gets. Also fixes a few other piglits. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72327 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72325 (for 9.2 the patches this depends on were asked to be backported separately in an email). Cc: "9.2" "10.0" [email protected] Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* dri megadriver_stub: add compatibility for older DRI loadersJordan Justen2013-12-091-0/+126
| | | | | | | | | | | | | | | | | | To help the transition period when DRI loaders are being updated to support the newer __driDriverExtensions_foo mechanism, we populate __driDriverExtensions with the extensions returned by __driDriverExtensions_foo during a library contructor function. We find the driver foo's name by using the dladdr function which gives the path of the dynamic library's name that was being loaded. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Keith Packard <[email protected]> Cc: "10.0" <[email protected]>
* i965: Replace OUT_RELOC_FENCED with OUT_RELOC.Kenneth Graunke2013-12-092-16/+10
| | | | | | | | | | | | | | On Gen4+, OUT_RELOC_FENCED is equivalent to OUT_RELOC; libdrm silently ignores the fenced flag: /* We never use HW fences for rendering on 965+ */ if (bufmgr_gem->gen >= 4) need_fence = false; Thanks to Eric for noticing this. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl/loops: Get rid of lower_bounded_loops and ir_loop::normative_bound.Paul Berry2013-12-095-26/+0
| | | | | | | | Now that loop_controls no longer creates normatively bound loops, there is no need for ir_loop::normative_bound or the lower_bounded_loops pass. Reviewed-by: Ian Romanick <[email protected]>
* glsl/loops: replace loop controls with a normative bound.Paul Berry2013-12-094-8/+16
| | | | | | | | | | | | | | This patch replaces the ir_loop fields "from", "to", "increment", "counter", and "cmp" with a single integer ("normative_bound") that serves the same purpose. I've used the name "normative_bound" to emphasize the fact that the back-end is required to emit code to prevent the loop from running more than normative_bound times. (By contrast, an "informative" bound would be a bound that is informational only). Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>