summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl: remove {add,get}_type_ast from glsl_symbol_tableChia-I Wu2014-03-283-28/+0
| | | | | | | They are not needed since 0da1a2cc369052643ccaea75a1722cc37652d82a. Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: fix glMultiDrawArrays inside a display listBrian Paul2014-03-271-3/+4
| | | | | | | | | | | | | | | The underlying glDrawArrays() calls weren't getting compiled into the display list. We simply need to use the current dispatch table so the CALL_DrawArrays() is routed to the display list save function. This patch also fixes glMultiModeDrawArraysIBM and glMultiModeDrawElementsIBM. Fixes the new piglit gl-1.4-dlist-multidrawarrays test. Cc: "10.0" "10.1" <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: overhaul texture / sample swizzle codeBrian Paul2014-03-271-53/+114
| | | | | | | | | | | | | | | | | | | | | | Previously we only examined the GL_DEPTH_MODE state to determine the sampler view swizzle for depth textures. Now we also consider the texture base format for color textures too. The basic idea is if we're sampling from a RGB texture we always want to get A=1, even if the actual hardware format might be RGBA. We had assumed that the texture's A values were always one since that's what Mesa's texstore code does. But if we render to the RGBA texture, the A values might not be 1. Subsequent sampling didn't return the right values. Now we examine the user-specified texture base format vs. the actual gallium format to determine the right swizzle. Fixes several fbo-blending-formats, fbo-clear-formats and fbo-tex-rgbx failures with VMware/svga driver (and possibly other drivers). No other piglit regressions with softpipe or VMware/svga. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: simplify apply_depthmode()Brian Paul2014-03-271-38/+47
| | | | | | | In preparation for following changes. I used a temporary test harness to compare the old code to the new for all possible swizzle inputs. No change in results.
* i965: Use intel_upload_space() for pull constant uploads.Eric Anholt2014-03-264-33/+17
| | | | | | | | | | | | | This also happens to fix a leak of the current GS pull constant BO on context destroy, by just not holding on to the pull const bos after the surface state is generated. No statistically significant performance difference on GLB2.7 on HSW at 1024x768 (n=40) or 320x240 (n=44), or on BYT at 320x240 (n=47). v2: Rebase on intel_upload simplification. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Massively simplify the intel_upload implementation.Eric Anholt2014-03-264-126/+77
| | | | | | | | | | | | | | | | | | | The implementation kept a page-sized area for uploading data, and uploaded chunks from that to a 64kb-sized streamed buffer. This wasted cache footprint (and extra state tracking to do so) when we want to just write our data into the buffer immediately. Instead, build it around an interface like brw_state_batch() that just gets you a pointer to BO memory to upload your stuff immediately. Improves OpenArena on HSW by 1.62209% +/- 0.355299% (n=61) and on BYT by 1.7916% +/- 0.415743% (n=31). v2: Rebase on Mesa master, drop old prototypes. Re-do performance comparison on a kernel that doesn't punish CPU efficiency improvements. Reviewed-by: Kenneth Graunke <[email protected]>
* draw/llvm: improve debugging output a bitZack Rusin2014-03-262-2/+3
| | | | | | | | | | | it's useful to know what the llvmbuildstore arguments are going to be before executing it because it can crash and make sure to print out the inputs only if we're not generating a gs because it fetches inputs differently. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* draw/gs: reduce the size of the gs output bufferZack Rusin2014-03-261-7/+13
| | | | | | | | | | | | We used to overallocate the output buffer sometimes running out of memory with applications rendering large geometries. The actual maximum number of vertices out is simply the maximum number of primitives in (number of gs invocations) multiplied by the maximum number of output vertices per gs input primitive (i.e. gs invocation). Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* svga: add work-around for Sauerbraten Z fighting issueBrian Paul2014-03-263-2/+49
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* svga: null out query's hwbuf pointer after destroyingBrian Paul2014-03-261-0/+1
| | | | | | Just to be extra safe. Reviewed-by: Jose Fonseca <[email protected]>
* svga: add some debug_printf() calls in the query object codeBrian Paul2014-03-261-2/+6
| | | | | | To help debug failures. Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: add null pointer checking in query object functionsBrian Paul2014-03-261-2/+16
| | | | | | | | | Don't pass null query object pointers into gallium functions. This avoids segfaulting in the VMware driver (and others?) if the pipe_context::create_query() call fails and returns NULL. Cc: "10.0" "10.1" <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* svga: fix a comment (sampler vs. sampler_view)Brian Paul2014-03-261-1/+1
|
* mesa: fix unpack_Z32_FLOAT_X24S8() / unpack_Z32_FLOAT() mix-upBrian Paul2014-03-261-4/+4
| | | | | | | And use the z32f_x24s8 helper struct in unpack_Z32_FLOAT_X24S8(). Cc: "10.0" "10.1" <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: fix indentation, formatting, etc in fbobject.cBrian Paul2014-03-261-38/+56
|
* mesa: rename format_(un)pack.c functions to match format names (pt. 7)Brian Paul2014-03-262-34/+34
| | | | | | | | | | | sed commands: s/z_Z24_S8\b/S8_UINT_Z24_UNORM/g s/z_S8_Z24\b/Z24_UNORM_S8_UINT/g s/z_Z16\b/Z_UNORM16/g s/z_Z32\b/Z_UNORM32/g s/z_Z32_FLOAT/Z_FLOAT32/g Reviewed-by: Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: rename format_(un)pack.c functions to match format names (pt. 6)Brian Paul2014-03-262-12/+12
| | | | | | | | sed commands: s/ARGB2101010_UINT\b/B10G10R10A2_UINT/g s/ABGR2101010_UINT\b/R10G10B10A2_UINT/g Reviewed-by: Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: rename format_(un)pack.c functions to match format names (pt. 5)Brian Paul2014-03-262-72/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | sed commands: s/SIGNED_R_UNORM8\b/R_SNORM8/g s/SIGNED_RG88_REV\b/R8G8_SNORM/g s/SIGNED_RGBX8888\b/X8B8G8R8_SNORM/g s/SIGNED_A8B8G8R8_UNORM\b/A8B8G8R8_SNORM/g s/SIGNED_R8G8B8A8_UNORM\b/R8G8B8A8_SNORM/g s/SIGNED_R_UNORM16\b/R_SNORM16/g s/SIGNED_R16G16_UNORM\b/R16G16_SNORM/g s/SIGNED_RGB_16\b/RGB_SNORM16/g s/SIGNED_RGBA_16\b/RGBA_SNORM16/g s/SIGNED_A_UNORM8\b/A_SNORM8/g s/SIGNED_L_UNORM8\b/L_SNORM8/g s/SIGNED_L8A8_UNORM\b/L8A8_SNORM/g s/SIGNED_L_UNORM8\b/I_SNORM8/g s/SIGNED_A_UNORM16\b/A_SNORM16/g s/SIGNED_L_UNORM16\b/L_SNORM16/g s/SIGNED_L16A16_UNORM\b/LA_SNORM16/g s/SIGNED_L_UNORM16\b/I_SNORM16/g s/XBGR16161616_SNORM\b/RGBX_SNORM16/g s/SIGNED_G8R8_UNORM\b/G8R8_SNORM/g s/SIGNED_G16R16_UNORM\b/G16R16_SNORM/g s/SIGNED_I_UNORM8\b/I_SNORM8/g s/SIGNED_I_UNORM16\b/I_SNORM16/g Reviewed-by: Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: rename format_(un)pack.c functions to match format names (pt. 4)Brian Paul2014-03-262-44/+44
| | | | | | | | | | | | | | | sed commands: s/SRGBA_UNORM8\b/A8B8G8R8_SRGB/g s/SABGR_UNORM8\b/R8G8B8A8_SRGB/g s/SARGB8\b/B8G8R8A8_SRGB/g s/XBGR8888_SRGB\b/R8G8B8X8_SRGB/g s/XRGB8888_SRGB\b/B8G8R8X8_SRGB/g s/SL_UNORM8\b/L_SRGB8/g s/SLA_UNORM8\b/L8A8_SRGB/g manually changed SRGB8 -> BGR_SRGB8 Reviewed-by: Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: rename format_(un)pack.c functions to match format names (pt. 3)Brian Paul2014-03-262-67/+67
| | | | | | | | | | | | | | | | | | | sed commands: s/LUMINANCE_FLOAT32\b/L_FLOAT32/g s/LUMINANCE_FLOAT16\b/L_FLOAT16/g s/LUMINANCE_ALPHA_FLOAT32\b/LA_FLOAT32/g s/LUMINANCE_ALPHA_FLOAT16\b/LA_FLOAT16/g s/ALPHA_FLOAT32\b/A_FLOAT32/g s/ALPHA_FLOAT16\b/A_FLOAT16/g s/XBGR32323232_FLOAT\b/RGBX_FLOAT32/g s/RGB9_E5_FLOAT\b/R9G9B9E5_FLOAT/g s/R11_G11_B10_FLOAT\b/R11G11B10_FLOAT/g s/INTENSITY_FLOAT16\b/I_FLOAT16/g s/INTENSITY_FLOAT32\b/I_FLOAT32/g v2: removed a few redundant/no-op substitutions Reviewed-by: Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: rename format_(un)pack.c functions to match format names (pt. 2)Brian Paul2014-03-262-36/+36
| | | | | | | | | | | | sed commands: s/ABGR2101010\b/R10G10B10A2_UNORM/g s/XRGB2101010_UNORM\b/B10G10R10X2_UNORM/g s/XBGR16161616_UNORM\b/RGBX_UNORM16/g s/ABGR2101010\b/R10G10B10A2_UNORM/g s/I8\b/I_UNORM8/g s/I16\b/I_UNORM16/g Reviewed-by: Reviewed-by: Roland Scheidegger <[email protected]>
* mesa: rename format_(un)pack.c functions to match format names (pt. 1)Brian Paul2014-03-262-403/+403
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sed commands: s/RGBA8888\b/A8B8G8R8_UNORM/g s/RGBA8888_REV\b/R8G8B8A8_UNORM/g s/ARGB8888\b/B8G8R8A8_UNORM/g s/ARGB8888_REV\b/A8R8G8B8_UNORM/g s/RGBA8888\b/X8B8G8R8_UNORM/g s/RGBA8888_REV\b/R8G8B8X8_UNORM/g s/XRGB8888\b/B8G8R8X8_UNORM/g s/XRGB8888_REV\b/X8R8G8B8_UNORM/g s/RGB888\b/BGR_UNORM8/g s/BGR888\b/RGB_UNORM8/g s/RGB565\b/B5G6R5_UNORM/g s/RGB565_REV\b/R5G6B5_UNORM/g s/ARGB4444\b/B4G4R4A4_UNORM/g s/ARGB4444_REV\b/A4R4G4B4_UNORM/g s/RGBA5551\b/A1B5G5R5_UNORM/g s/ARGB1555\b/B5G5R5A1_UNORM/g s/ARGB1555_REV\b/A1R5G5B5_UNORM/g s/AL44\b/L4A4_UNORM/g s/AL88\b/L8A8_UNORM/g s/AL88_REV\b/A8L8_UNORM/g s/AL1616\b/L16A16_UNORM/g s/AL1616_REV\b/A16L16_UNORM/g s/RGB332\b/B2G3R3_UNORM/g s/A8\b/A_UNORM8/g s/A16\b/A_UNORM16/g s/L8\b/L_UNORM8/g s/L16\b/L_UNORM16/g s/L8\b/I_UNORM8/g s/L16\b/I_UNORM16/g s/R8\b/R_UNORM8/g s/GR88\b/R8G8_UNORM/g s/RG88\b/G8R8_UNORM/g s/R16\b/R_UNORM16/g s/GR1616\b/R16G16_UNORM/g s/RG1616\b/G16R16_UNORM/g s/ARGB2101010\b/B10G10R10A2_UNORM/g Reviewed-by: Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: Fix llvmpipe_create_gs_state.Zack Rusin2014-03-261-3/+5
| | | | | | | Revert unintended behaviour change from commit b995a010e688bc4d4557e973e5e28091c378e881. Tested-by: José Fonseca <[email protected]>
* st/omx/dec: fix possible segfault at eosChristian König2014-03-261-1/+1
| | | | Signed-off-by: Christian König <[email protected]>
* mapi/glapi: Use ElementTree instead of libxml2.José Fonseca2014-03-268-221/+141
| | | | | | | | | | | | | | | | | | | | | | It is quite hard to meet the dependency of the libxml2 python bindings outside Linux, and in particularly on MacOSX; whereas ElementTree is part of Python's standard library. ElementTree is more limited than libxml2: no DTD verification, defaults from DTD, or XInclude support, but none of these limitations is serious enough to justify using libxml2. In fact, it was easier to refactor the code to use ElementTree than to try to get libxml2 python bindings. In the process, gl_item_factory class was refactored so that there is one method for each kind of object to be created, as it simplifies things substantially. I confirmed that precisely the same output is generated for GL/GLX/GLES. v2: Remove m4/ax_python_module.m4 as suggested by Matt Turner. Reviewed-by: Ian Romanick <[email protected]>
* mapi/glapi: Remove glX_doc.py.José Fonseca2014-03-261-280/+0
| | | | | | As suggested by Ian Romanick, given it's no longer used. Reviewed-by: Ian Romanick <[email protected]>
* st/mesa: fix sampler view handling with shared textures v4Christian König2014-03-263-0/+28
| | | | | | | | | | | | | Release the references to the sampler views before destroying the pipe context. v2: remove TODO and unrelated change v3: move to st_texture.[ch], rename callback, add comment v4: fix rebase mess up and add further cleanups Signed-off-by: Christian König <[email protected]> Reviewed-by: Brian Paul <[email protected]> Cc: "10.0 10.1" <[email protected]>
* gallivm: fix no-op n:n lp_build_resize()Roland Scheidegger2014-03-261-6/+6
| | | | | | | | | | This can get called in some circumstances if both src type and dst type have same width (seen with float32->unorm32). While this particular case was bogus anyway let's just fix that as it can work trivially (due to the way it was called it actually worked anyway apart from the assert). Reviewed-by: Zack Rusin <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* i965: For fast color clears, only check the color of live channels.Kevin Rogovin2014-03-251-1/+2
| | | | | | | | When deciding if a clear color is suitable for fast clear, take into account if a color channel is active in the buffer format. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Set Broadwell MOCS values everywhere it's possible.Kenneth Graunke2014-03-256-12/+27
| | | | | | | | | | | | | | This patch introduces two pre-canned MOCS values: BDW_MOCS_WB (write-back, all caches) and BDW_MOCS_WT (write-through, all caches). We use write-through caching for render targets, and write-back for all other data. (At least on Haswell, I believe write-back LLC/eLLC didn't work for scan-out buffers, while write-through did.) No performance analysis has been done on the impact of this patch. Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Eric Anholt <[email protected]>
* mesa: In core profile, refuse to draw unless a VAO is bound.Kenneth Graunke2014-03-251-1/+4
| | | | | | | | | | | | Core profile requires a non-default VAO to be bound. Currently, calls to glVertexAttribPointer raise INVALID_OPERATION unless a VAO is bound, and we never actually get any vertex data set. Trying to draw without any vertex data can only cause problems. In i965, it causes a crash. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76400 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Cc: [email protected]
* Revert "build: llvm libs may not be in system search path, add rpath"Ilia Mirkin2014-03-251-1/+0
| | | | | | | | | | | | This reverts commit d9b983519c63b9072677364a6e399d213a1855e5. Unfortunately it seems like rpath is evaluated before LD_LIBRARY_PATH, so this breaks e.g. steam, as well as any other user of that env var, if the llvm path happens to be where other libs also reside. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76082 Reviewed-by: Tom Stellard <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]>
* Revert "mesa: Fix format matching checks for GL_INTENSITY* internalformats."Chris Forbes2014-03-261-12/+8
| | | | This reverts commit 40d7b5195351d3e4199e7a840615a595a6dbaefc.
* mesa: move GLbitfield any_valid_stages declaration before codeBrian Paul2014-03-251-1/+2
| | | | To fix MSVC build.
* glsl: Clean up "unused parameter" warningsIan Romanick2014-03-251-5/+5
| | | | | | | | | | | ../../src/glsl/ir_constant_expression.cpp:486:1: warning: unused parameter 'variable_context' [-Wunused-parameter] ../../src/glsl/ir_constant_expression.cpp:1633:1: warning: unused parameter 'variable_context' [-Wunused-parameter] ../../src/glsl/ir_constant_expression.cpp:1752:1: warning: unused parameter 'variable_context' [-Wunused-parameter] ../../src/glsl/ir_constant_expression.cpp:1761:1: warning: unused parameter 'variable_context' [-Wunused-parameter] ../../src/glsl/ir_constant_expression.cpp:1769:1: warning: unused parameter 'variable_context' [-Wunused-parameter] Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* glsl: Minor clean ups in constant_referencedIan Romanick2014-03-251-11/+6
| | | | | | | These could probably be squashed into one of the previous commits. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* glsl: Remove ir_dereference::constant_referencedIan Romanick2014-03-252-61/+0
| | | | | | | | All of the functionality is implemented in a private function in the one file where it is used. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* glsl: Fold implementation of ir_dereference_array::constant_referenced into ↵Ian Romanick2014-03-251-46/+43
| | | | | | | wrapper Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* glsl: Fold implementation of ir_dereference_record::constant_referenced into ↵Ian Romanick2014-03-251-17/+21
| | | | | | | wrapper Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* glsl: Fold implementation of ir_dereference_variable::constant_referenced ↵Ian Romanick2014-03-251-12/+13
| | | | | | | into wrapper Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* glsl: Add wrapper function that calls ir_dereference::constant_referencedIan Romanick2014-03-251-16/+36
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* glsl: Group all of the constant_referenced functions togetherIan Romanick2014-03-252-96/+109
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* i965: fix dma_buf import with non-zero offset.Gwenole Beauchesne2014-03-251-0/+9
| | | | | | | | | | | Fix eglCreateImage() from a packed dma_buf surface with a non-zero offset to pixels data. In particular, this fixes support for planar YUV surfaces when they are individually mapped on a per-plane basis, i.e. when the OES_EGL_image_external is not used and user application wants to use its own shader code for composition, or processing on individual plane (OCL). Signed-off-by: Gwenole Beauchesne <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/sso: Implement ValidateProgramPipelineGregory Hainaut2014-03-254-3/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation note: I don't use context for ralloc (don't know how). The check on PROGRAM_SEPARABLE flags is also done when the pipeline isn't bound. It doesn't make any sense in a DSA style API. Maybe we could replace _mesa_validate_program by _mesa_validate_program_pipeline. For example we could recreate a dummy pipeline object. However the new function checks also the TEXTURE_IMAGE_UNIT number not sure of the impact. V2: Fix memory leak with ralloc_strdup Formatting improvement V3 (idr): * Actually fix the leak of the InfoLog. :) * Directly generate logs in to gl_pipeline_object::InfoLog via ralloc_asprintf isntead of using a temporary buffer. * Split out from previous uber patch. * Change spec references to include section numbers, etc. * Fix a bug in checking that a different program isn't active in a stage between two stages that have the same program. Specifically, if (pipe->CurrentVertexProgram->Name == pipe->CurrentGeometryProgram->Name && pipe->CurrentGeometryProgram->Name != pipe->CurrentVertexProgram->Name) should have been if (pipe->CurrentVertexProgram->Name == pipe->CurrentFragmentProgram->Name && pipe->CurrentGeometryProgram->Name != pipe->CurrentVertexProgram->Name) v4 (idr): Rework to use CurrentProgram array in loops. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/sso: Add _mesa_sampler_uniforms_pipeline_are_validGregory Hainaut2014-03-252-0/+79
| | | | | | | | | | | | | | | | | | This is much like _mesa_sampler_uniforms_are_valid, but it operates across an entire pipeline object. This function differs from _mesa_sampler_uniforms_are_valid in that it directly creates the gl_pipeline_object::InfoLog instead of writing to some temporary buffer. This was originally included in another patch, but it was split out by Ian Romanick. v2 (idr): Fix the loop bounds. shProg isn't an array, so ARRAY_SIZE(shProg) was 1, so only the vertex program was validated. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/sso: Add gl_pipeline_object::InfoLog supportGregory Hainaut2014-03-252-3/+24
| | | | | | | | | | | V2 (idr): * Keep the behavior of other info logs in Mesa: and empty info log reports a GL_INFO_LOG_LENGTH of zero. * Use a NULL pointer to denote an empty info log. * Split out from previous uber patch. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/sso: Implement GL_PROGRAM_PIPELINE_BINDING for glGetGregory Hainaut2014-03-252-0/+12
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/sso: Implement _mesa_BindProgramPipelineGregory Hainaut2014-03-251-0/+69
| | | | | | | | | | | | | | | | | | | | Test become green in piglit: The updated ext_transform_feedback-api-errors:useprogstage_noactive useprogstage_active bind_pipeline arb_separate_shader_object-GetProgramPipelineiv arb_separate_shader_object-IsProgramPipeline For the moment I reuse Driver.UseProgram but I guess it will be better to create a UseProgramStages functions. Opinion is welcome V2: formatting & rename V3 (idr): * Change spec references to core OpenGL versions instead of issues in the extension spec. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/sso: Implement _mesa_UseProgramStagesGregory Hainaut2014-03-251-0/+102
| | | | | | | | | | | | | | | | | | | Now arb_separate_shader_object-GetProgramPipelineiv should pass. V3 (idr): * Change spec references to core OpenGL versions instead of issues in the extension spec. * Split out from previous uber patch. v4 (idr): Use _mesa_has_geometry_shaders in _mesa_UseProgramStages to detect availability of geometry shaders. v5 (idr): Whitespace cleanup, use _mesa_lookup_shader_program_err instead of open-coding it again, and update some comments at the end of _mesa_UseProgramStages. All suggested by Eric. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/sso: Add gl_pipeline_object parameter to _mesa_use_shader_programGregory Hainaut2014-03-253-15/+24
| | | | | | | | | | | | | Extend use_shader_program to support a different target. Allow to reuse the function to update the pipeline state. Note I bypass the flush when target isn't current. Maybe it would be better to create a new UseProgramStages driver function This was originally included in another patch, but it was split out by Ian Romanick. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>