aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i965/fs: Fix a comment in copy propagation.Eric Anholt2012-11-041-1/+3
| | | | | | | We haven't been only tracking raw GRF-GRF moves since the constant propagation merge, and also the extension for source modifiers and uniforms. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Allow copy-propagation on pull constant load values.Eric Anholt2012-11-041-3/+4
| | | | | | | | | | | | Given that we handle similarly-regioned GRFs registers for our copy propagation from our UNIFORM file, there's no reason not to allow it. The shader-db impact is negligible -- +90 instructions total, 2 shaders helped and 7 hurt (slightly increased register pressure increased spilling), but this is to prevent regression in other shaders when fixing copy_propagation to reduce register pressure in the shaders that are hurt here. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Do dead code elimination just after copy propagation.Eric Anholt2012-11-041-1/+1
| | | | | | | | | | | | | | | | If we put the register coalescing in between the two, then we end up with code sequences involving dead writes that the dead code elimination doesn't know how to remove. In place of making dead code elimination smart (which we should do, too), make it less important for the moment. shader-db results: total instructions in shared programs: 722240 -> 721275 (-0.13%) instructions in affected programs: 50573 -> 49608 (-1.91%) (no shaders regressed). Reviewed-by: Kenneth Graunke <[email protected]>
* nv50,nvc0: expose ARB_map_buffer_alignmentLucas Stach2012-11-044-6/+8
| | | | | | All HW buffers (also suballocated ones) are already aligned. Just make sure that also the initial sysram buffers have proper alignment.
* i965/fs: Compact the virtual GRF arrays.Kenneth Graunke2012-11-032-0/+61
| | | | | | | | | | | | | | During code generation, we create tons of temporary variables, many of which get immediately killed and are never used. Later optimization and analysis passes, such as compute_live_intervals, loop over all the virtual GRFs. By compacting them, we can save a lot of overhead. Reduces compilation time in L4D2's largest fragment shader from 10.2 seconds to 5.2 seconds (50%). Drops compute_live_variables() from 10-12% of another game's startup time to 8%. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* dispatch_sanity test: add GL CORE 3.1 testJordan Justen2012-11-031-0/+705
| | | | | | | | | | The function list was generated from glcorearb.h for GL 4.3. Note that many GL 4.X functions are commented out, and indicate that they need to be added to Mesa's XML. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* dispatch_sanity test: create common context creation functionJordan Justen2012-11-031-36/+16
| | | | | | | | We also no longer call _swrast_CreateContext, _tnl_CreateContext or _swsetup_CreateContext when creating the context. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* dispatch_sanity test: allow newer functions to be set to NOPJordan Justen2012-11-031-3/+11
| | | | | | | | | If a GL function was introduced in a later GL version than the context we are testing, then it is okay if it is set to the _mesa_generic_nop function. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* dispatch_sanity test: pass ctx to validate_functions/nopsJordan Justen2012-11-031-9/+13
| | | | | | | This will allow validate_functions to access ctx->Version. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* dispatch_sanity test: add version to function listJordan Justen2012-11-031-460/+461
| | | | | | | | | This will be used by GL CORE contexts to differentiate functions that can be set to nop from functions that are required for a particular context version. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: remove unimplemented FramebufferTextureFaceARBJordan Justen2012-11-033-19/+0
| | | | | | | | This function can be re-added with an actual implementation when ARB_geometry_shader4 is supported. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: remove unimplemented FramebufferTextureARBJordan Justen2012-11-033-16/+0
| | | | | | | | This function can be re-added with an actual implementation when ARB_geometry_shader4 is supported. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: disable ProgramParameteri until it is neededJordan Justen2012-11-031-4/+0
| | | | | | | | | ProgramParameteri will be required for ARB_geometry_shader4 or GLES3. Don't enable this function until either of those is supported. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glapi: alias ProgramParameteriARB to ProgramParameteriJordan Justen2012-11-033-5/+5
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glapi: move include for ARB_get_program_binary.xml to gl_API.xmlJordan Justen2012-11-032-1/+3
| | | | | | | | These functions are part in GL 4.3. Moving this will allow ProgramParameteriARB to alias ProgramParameteri. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glapi: alias FramebufferTextureARB to FramebufferTextureJordan Justen2012-11-033-5/+5
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa shaderapi: don't enable various functions for GL COREJordan Justen2012-11-031-0/+2
| | | | | | | | | | | These EXT_separate_shader_objects function will no longer be enabled for CORE profiles: * UseShaderProgramEXT * ActiveProgramEXT * CreateShaderProgramEXT Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa api_exec: disable StencilFuncSeparateATI for API_OPENGL_COREJordan Justen2012-11-031-1/+1
| | | | | | | This was mistakenly enabled in a21116f. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa api_exec: add comment regarding GetPointerv & CORE profilesJordan Justen2012-11-031-0/+4
| | | | | | | GetPointerv was de-deprecated in 893ddb. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* r600g: make tgsi-to-llvm generates store.pixel* intrinsic for fsVincent Lejeune2012-11-026-12/+130
| | | | Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* configure.ac: Prevent build of radeon llvm backend with llvm < 3.2Vincent Lejeune2012-11-021-5/+13
| | | | Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* android: Update for builtin_stubs.cpp moveThierry Reding2012-11-021-1/+1
| | | | | | | | This fixes the Android build after the move of builtin_stubs.cpp into the builtin_compiler subdirectory. This patch is untested. Signed-off-by: Thierry Reding <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* radeonsi: Implement support for vertex shader samplers.Michel Dänzer2012-11-022-22/+60
| | | | Signed-off-by: Michel Dänzer <[email protected]>
* glsl: Fix builtin_compiler build by -I $(top_srcdir)/include.Johannes Obermayr2012-11-021-0/+1
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56664
* scons: Update for builtin_stubs.cppJosé Fonseca2012-11-021-3/+4
| | | | | | | | | | | | Note this by itself is not enough to fix scons build -- it will fail until you remove: rm -rf build/*/glsl/builtin_compiler because that node was a filei before, but it will be now a directory. This also means that bisecting across this change will require wiping the build directory..
* build: Don't cross-compile GLSL builtin compilerThierry Reding2012-11-018-40/+385
| | | | | | | | | | | | | | | | | | | | | | The builtin_compiler binary is used during the build process to generate code for the builtin GLSL functions. Since this binary needs to be run on the build host, it must not be cross-compiled. This patch fixes the build system to compile a second version of the source files and the builtin_compiler binary itself for the build system. It does so by defining the CC_FOR_BUILD and CXX_FOR_BUILD variables, which are searched for by the configure script and point to the location of native C and C++ compilers. In order for this to work properly, builtin_function.cpp is removed from BUILT_SOURCES, otherwise the build system would try to generate it before having had a chance to descend into the builtin_compiler subdirectory. With the builtin_compiler and glsl_compiler now being generated at different stages, the build instructions for glsl_compiler can be simplified a bit. Signed-off-by: Thierry Reding <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* libgl-xlib: include glheader.h instead of GL/gl.h to fix buildBrian Paul2012-11-011-1/+1
| | | | GL/gl.h doesn't define GLfixed but glapitable.h uses it.
* i965: Remove unused variables after removing the old VS backend.Kenneth Graunke2012-11-011-2/+0
| | | | Fixes compiler warnings about unused variables.
* i965: Remove unnecessary walk through Mesa IR in ProgramStringNotify().Kenneth Graunke2012-11-011-82/+0
| | | | | | | | | | | | | Variable indexing of non-uniform arrays only exists in GLSL. Likewise, OPCODE_CAL/OPCODE_RET only existed to try and support GLSL's function calls. We don't use Mesa IR for GLSL, and these features are explicitly disallowed by ARB_vertex_program/ARB_fragment_program and never generated by ffvertex_prog.c. Since they'll never happen, there's no need to check for them, which saves us from walking through all the Mesa IR instructions. Reviewed-by: Eric Anholt <[email protected]>
* i965: Remove VS constant buffer read support from brw_eu_emit.c.Kenneth Graunke2012-11-012-121/+0
| | | | | | | brw_vec4_emit.cpp implements this directly; only the old backend used the brw_eu_emit.c code. Reviewed-by: Eric Anholt <[email protected]>
* i965: Update comment about clipper constants.Kenneth Graunke2012-11-011-9/+1
| | | | | | | The old VS backend doesn't exist, but I believe these still need to be delivered to the clipper thread. Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Remove brw_vs_compile::constant_map.Kenneth Graunke2012-11-012-18/+1
| | | | | | It was only used for the old backend. Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Remove support for the old parameter layout.Kenneth Graunke2012-11-015-70/+7
| | | | | | Only the old backend used it. Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Delete the old vertex shader backend.Kenneth Graunke2012-11-014-1836/+0
| | | | | | It's no longer used for anything. Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Replace brw_vs_emit.c with dumping code into the vec4_visitor.Kenneth Graunke2012-11-016-32/+738
| | | | | | | | | | | | | | | | | | | | Rather than having two separate backends, just create a small layer that translates the subset of Mesa IR used for ARB_vertex_program and fixed function programs to the Vec4 IR. This allows us to use the same optimization passes, code generator, register allocator as for GLSL. v2: Incorporate Eric's review comments. - Fix use of uninitialized src_swiz[] values in the SWIZZLE_ZERO/ONE case: just initialize it to 0 (.x) since the value doesn't matter (those channels get writemasked out anyway). - Properly reswizzle source register's swizzles, rather than overwriting the swizzle. - Port the old brw_vs_emit code for computing .x of the EXP2 opcode. - Update comments, removing mention of NV_vertex_program, etc. - Delete remaining #warning lines and debug comments. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Refactor min/max handling to share code.Kenneth Graunke2012-11-012-18/+21
| | | | | | | | v2: Properly use "conditionalmod" pre-Gen6, rather than the incorrectly copy-and-pasted "BRW_CONDITIONAL_G". Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Add support for emitting DPH opcodes.Kenneth Graunke2012-11-013-0/+6
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Only do INTEL_DEBUG=perf when there's a GLSL shader.Kenneth Graunke2012-11-011-3/+2
| | | | | | | | This will become necessary once we start supporting ARB programs and fixed function in this backend. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* dispatch: stop generating separate GLES1 API code.Paul Berry2012-11-0110-4109/+4
| | | | | | | | | | This patch removes the generated files api_exec_es1.c, api_exec_es1_dispatch.h, and api_exec_es1_remap_helper.h (and the source files and build rules used to generate them), since they are no longer used. GLES1 now uses the same dispatch table layout as all the other APIs. Reviewed-by: Kenneth Graunke <[email protected]>
* dispatch: stop using _mesa_create_exec_table_es1() for GLES1.Paul Berry2012-11-012-29/+18
| | | | | | | | | | | | | | | | | | | | This patch modifies context creation code for GLES1 to use _mesa_create_exec_table() (which is used for all other APIs) instead of the GLES1-specific _mesa_create_exec_table_es1(). There is a slight change in functionality. As a result of a mistake in the code generation of _mesa_create_exec_table_es1(), it does not include glFlushMappedBufferRangeEXT or glMapBufferRangeEXT (this is because when support for those two functions was added in commit 762d9ac, src/mesa/main/APIspec.xml wasn't updated). With this patch, glFlushMappedBufferRangeEXT and glMapBufferRangeEXT are properly included in the dispatch table. Accordingly, dispatch_sanity.cpp is modified to expect these two functions to be present. Reviewed-by: Kenneth Graunke <[email protected]> v2: Leave GLES1.1 dispatch sanity test disabled when not building GLES1 support.
* dispatch: GLES1 fixes for _mesa_create_exec_table().Paul Berry2012-11-018-164/+291
| | | | | | | | | | | | | | | | | Currently, _mesa_create_exec_table() (in api_exec.c) is used for all APIs except GLES1. In GLES1, _mesa_create_exec_table_es1() (a code generated function) is used instead. In principle, this shouldn't be necessary. It should be possible for api_exec.c to contain the logic for populating the dispatch table for all API's. This patch paves the way for using _mesa_create_exec_table() instead of _mesa_create_exec_table_es1(), by making _mesa_create_exec_table() (and the functions it calls) expose the correct subset of desktop GL functions for GLES1. Reviewed-by: Kenneth Graunke <[email protected]>
* dispatch: Make a header to go along with querymatrix.c.Paul Berry2012-11-012-9/+43
| | | | | | | | | | | | | This patch creates a header querymatrix.h, to allow functions defined in querymatrix.c to be used from other .c files. It also switches from the nonstandard GL_APIENTRY to GLAPIENTRY. Reviewed-by: Kenneth Graunke <[email protected]> v2: Don't declare _mesa_Get{Integer,Float}v in querymatrix.c. Instead, just include main/get.h. Reviewed-by: Chad Versace <[email protected]>
* dispatch: Add standard boilerplate and GL_APIENTRY to es1_conversion.h.Paul Berry2012-11-012-4/+31
| | | | | | | | | | | | | This patch adds the usual boilerplate (copyright notice and guards against redundant inclusion) to es1_conversion.h. It also moves the definition of GL_APIENTRY from es1_conversion.c. This allows es1_conversion.h to be safely included from other .c files. Reviewed-by: Kenneth Graunke <[email protected]> v2: Use copyright notice from src/mesa/main/es_generator.py (the script that used to generate this file).
* dispatch: Include GLES1-only functions in dispatch table.Paul Berry2012-11-013-23/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously dispatch table-related code was generated from gl_API.xml, so it did not include slots for GLES1-only functions (such as those taking fixed-point arguments). This patch generates dispatch table-related code from gl_and_es_API.xml, so that GLES1-only functions are included. This paves the way for future patches that will unify the GLES1 dispatch table with the dispatch tables for the other APIs. The following generated files are affected: - glapi_x86.S - glapi_x86-64.S - glapi_sparc.S - glprocs.h - glapitemp.h - glapitable.h - glapi_gentable.c - dispatch.h - remap_helper.h Since this change affects makefiles, a full rebuild is required. Reviewed-by: Kenneth Graunke <[email protected]> v2: Adjust dependencies to ensure that generated files will be rebuilt whenever any ES-related XML source files are changed. Reviewed-by: Chad Versace <[email protected]>
* dispatch: properly handle parameter name mismatches in glapitemp.h.Paul Berry2012-11-012-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when code-generating aliased functions in glapitemp.h, we weren't consistent about which function alias we used to obtain the parameter names, with the risk that we would generate incorrect code like this: KEYWORD1 void KEYWORD2 NAME(Foo)(GLint x) { (void) x; DISPATCH(Foo, (x), (F, "glFoo(%d);\n", x)); } KEYWORD1 void KEYWORD2 NAME(FooEXT)(GLint y) { (void) x; DISPATCH(Foo, (x), (F, "glFooEXT(%d);\n", x)); } At the moment there are no aliased functions with mismatched parameter names, so this isn't the problem. But when we introduce GLES1 functions into the dispatch table, there will be (MapBufferRange/MapBufferRangeEXT). This patch paves the way for that by fixing the code generation script to handle the mismatch correctly. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* dispatch: Include glheader.h in dispatch-related files.Paul Berry2012-11-014-4/+4
| | | | | | | | | This ensures that GLES1-only typedefs are available in these files. In a future patch, this will allow us to expand the dispatch table to include GLES1-only functions. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* dispatch: Update check_table.cpp to reflect recent aliasing changes.Paul Berry2012-11-011-2/+0
| | | | | | | | | | | | | | | | In commits bad96f6 and e7dd2e5 I added the following aliases: - ClampColor -> ClampColorARB - VertexAttribDivisor -> VertexAttribDivisorARB But I neglected to update check_table.cpp, causing "make check" to fail for non-shared-glapi builds. This patch removes the functions that are now aliased from check_table.cpp, so that "make check" works correctly again. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965/gen4: Fix assertion failures in depthstencil piglit tests.Eric Anholt2012-11-011-4/+5
| | | | | | Don't forget to set depth_mt even if !hiz_mt. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add "alpha to coverage" to performance debug recompile messages.Kenneth Graunke2012-10-311-0/+1
| | | | | | | This was missing and got labeled "Something else". Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Don't replicate data for zero-stride arrays when copying to VBOs.Kenneth Graunke2012-10-311-7/+6
| | | | | | | | | | | | | | When copy_array_to_vbo_array encountered an array with src_stride == 0 and dst_stride != 0, we would replicate out the single element to the whole size (max - min + 1). This is unnecessary: we can simply upload one copy and set the buffer's stride to 0. Decreases vertex upload overhead in an upcoming Steam for Linux title. Prior to this patch, copy_array_to_vbo_array appeared very high in the profile (Eric quoted 20%). After the patch, it disappeared completely. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>