summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
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]>
* 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]>
* 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]>
* 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
|
* 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-131-0/+5
| | | | | | 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-133-1/+105
| | | | | | | | | | 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]>
* 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-122-16/+16
| | | | | | | | | | | | | 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-121-6/+6
| | | | | | | | | | 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]>
* 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]>
* mesa: add IsSample bitfield to gl_fragment_programChris Forbes2013-12-071-0/+6
| | | | | | | | Drivers will need to look at this to decide if they need to do per-sample fragment shader dispatch. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* mesa: Remove support for GL_MESA_texture_arrayIan Romanick2013-12-045-36/+0
| | | | | | | | | | | | | | | | | | This extension enabled the use of texture array with fixed-function and assembly fragment shaders. No applications are known to use this extension. NOTE: This patch regresses GL_TEXTURE_1D_ARRAY and GL_TEXTURE_2D_ARRAY cases of the copyteximage piglit test. The test is incorrectly using texture arrays with fixed function while only requiring the GL_EXT_texture_array extension. A fix for the test has been posted to the piglit mailing list. http://lists.freedesktop.org/archives/piglit/2013-November/008639.html Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Use a single enable for GL_EXT_texture_array and GL_MESA_texture_arrayIan Romanick2013-12-0411-54/+28
| | | | | | | | | | | Every driver that enables one also enables the other. The difference between the two is MESA adds support for fixed-function and assembly fragment shaders, but EXT only adds support for GLSL. The MESA extension was created back when Mesa did not support GLSL. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Minor clean-up of target_enum_to_indexIan Romanick2013-12-041-6/+6
| | | | | | | | | Constify the gl_context parameter, and remove suffixes from enums that have non-suffix versions. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Silence GCC warning in count_tex_sizeIan Romanick2013-12-041-0/+2
| | | | | | | | | main/texobj.c: In function 'count_tex_size': main/texobj.c:886:23: warning: unused parameter 'key' [-Wunused-parameter] Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Silence GCC warning in _mesa_test_texobj_completenessIan Romanick2013-12-041-1/+1
| | | | | | | | | | | | main/texobj.c: In function '_mesa_test_texobj_completeness': main/texobj.c:553:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] main/texobj.c:553:193: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] main/texobj.c:553:254: warning: signed and unsigned type in conditional expression [-Wsign-compare] main/texobj.c:553:148: warning: signed and unsigned type in conditional expression [-Wsign-compare] Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add missing API check for GL_TEXTURE_3DIan Romanick2013-12-041-1/+1
| | | | | | | | There are no 3D textures in OpenGL ES 1.x. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add missing checks for GL_TEXTURE_CUBE_MAP_ARRAYIan Romanick2013-12-041-1/+2
| | | | | | | | | | | | That enum requires GL_ARB_texture_cube_map_array, and it is only available on desktop GL. It looks like this has been an un-noticed issue since GL_ARB_texture_cube_map_array support was added in commit e0e7e295. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: reduce memory used for short display listsBrian Paul2013-12-041-0/+35
| | | | | | | | | | | | | Display lists allocate memory in chunks of 256 tokens (1KB) at a time. If an app creates many short display lists or uses glXUseXFont() this can waste quite a bit of memory. This patch uses realloc() to trim short lists and reduce the memory used. Also, null/zero-out some list construction fields in _mesa_EndList(). Reviewed-by: Ian Romanick <[email protected]>
* mesa: update/remove display list commentsBrian Paul2013-12-041-16/+5
| | | | Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove gl_dlist_node::next pointer to reduce dlist memory useBrian Paul2013-12-041-8/+10
| | | | | | | Now, sizeof(gl_dlist_node)==4 even on 64-bit systems. This can halve the memory used by some display lists on 64-bit systems. Reviewed-by: Ian Romanick <[email protected]>
* mesa: begin reducing memory used by display listsBrian Paul2013-12-041-172/+252
| | | | | | | | | | | | | | | | | This is a first step in reducing memory used by display lists on 64-bit systems. On 64-bit systems, the gl_dlist_node union type is 8 bytes because of the 'data' and 'next' fields. This causes every display list node/token to occupy 8 bytes instead of 4 as originally designed. This basically doubles the memory used by some display lists on 64-bit systems. The fix is to remove the 64-bit 'data' and 'next' pointer fields from the union and instead store them as a pair of 32-bit values. Easily done with a few helper functions. The next patch will take care of the 'next' field. Reviewed-by: Ian Romanick <[email protected]>
* mesa: modified _mesa_align_free() to accept NULL pointerSiavash Eliasi2013-12-041-5/+9
| | | | | | | | | | | So that it acts like ordinary free(). This lets us remove a bunch of if statements where the function is called. v2: - Avoiding compile error on MSVC and possible warnings on other compilers. - Added comment regards passing NULL pointer being safe. Reviewed-by: Brian Paul <[email protected]>
* mesa: don't leak performance monitors on context destroyIlia Mirkin2013-12-043-0/+23
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "10.0" <[email protected]>
* mesa: resolve typo DTXn/DXTnEmil Velikov2013-12-031-1/+1
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* mesa: expose AMD_vertex_shader_layer in the core profile onlyMarek Olšák2013-12-031-1/+1
| | | | | | | It needs glFramebufferTexture, which isn't available in the compatibility profile. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Simplify the built-in function linking code.Kenneth Graunke2013-12-012-4/+2
| | | | | | | | | | | | | | | | | | Previously, we stored an array of up to 16 additional shaders to link, as well as a count of how many each shader actually needed. Since the built-in functions rewrite, all the built-ins are stored in a single shader. So all we need is a boolean indicating whether a shader needs to link against built-ins or not. During linking, we can avoid creating the temporary array if none of the shaders being linked need built-ins. Otherwise, it's simply a copy of the array that has one additional element. This is much simpler. This patch saves approximately 128 bytes of memory per gl_shader object. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: fix mem leak of glPixelMap data in display listBrian Paul2013-11-291-13/+16
| | | | | | And simplify save_PixelMapfv() by using the memdup() function. Reviewed-by: Ian Romanick <[email protected]>