summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: extract _mesa_is_legal_tex_storage_format helperChris Forbes2013-03-312-17/+23
| | | | | | | This is about to be used in teximagemultisample() when immutable=true. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Delete VERT_ATTRIB_GENERIC_NV and VERT_BIT_GENERIC_NV macros.Kenneth Graunke2013-03-301-10/+0
| | | | | | | | These haven't been used since we deleted NV_vertex_program support. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Fix an inconsistency inb the VUE map with gl_ClipVertex on gen4/5.Eric Anholt2013-03-301-7/+11
| | | | | | | | | | | | | We are intentionally not allocating a slot for gl_ClipVertex. But by leaving the bit set in the slots_valid, the fragment shader's computation of where varyings are in urb entry coming out of the SF would be off by one. Fixes rendering in Freespace 2 SCP, and improves rendering in TF2. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62830 Tested-by: Joaquín Ignacio Aramendía <[email protected]> NOTE: This is a candidate for the 9.1 branch. Reviewed-and-tested-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* intel: Remove a never-taken debug print path.Eric Anholt2013-03-301-5/+0
| | | | | | | | Alessandro Pignotti noted when I added this code in commit 0e723b135bfd59868c92c3ae243f1adaedaec3a5 that it's in the else block for "if (busy)", so this debug print couldn't happen. Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: add ir_lod case in GLSL->TGSI code to silence warningBrian Paul2013-03-291-0/+3
|
* glsl: Generated masked write instead of vector array index for UBO loweringIan Romanick2013-03-291-7/+3
| | | | | | | | | | | | | | | When reading a column from a row-major matrix, we would slot the single value read into the vector using an ir_dereference_array of the vector with a constant index. This will (eventually) get optimized to a masked-write, so just generate the masked write in the first place. v2: Remove unused variable 'chan'. Suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Cc: Eric Anholt <[email protected]>
* glsl: Replace open-coded dot-product with dotIan Romanick2013-03-291-4/+5
| | | | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Cc: Eric Anholt <[email protected]> Cc: Paul Berry <[email protected]>
* glsl: Replace constant-index vector array accesses with swizzlesIan Romanick2013-03-292-87/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | Search and replace: ][0] -> ].x ][1] -> ].y ][2] -> ].z ][3] -> ].w Fixes piglit tests inverse-mat[234].{vert,frag}. These tests call the inverse function with constant parameters and expect proper constant folding to happen. My suspicion is that this patch papers over some bug in constant propagation involving array accesses. Either way, all of these accesses eventually get lowered to swizzles. This cuts out the middle man (saving a trivial amount of CPU). NOTE: This is a candidate for the 9.1 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Cc: Eric Anholt <[email protected]> Cc: Paul Berry <[email protected]>
* glsl: Add missing bool case in glsl_type::get_scalar_typeIan Romanick2013-03-291-0/+2
| | | | | | | | | | | | Since the case was missing bec4->get_scalar_type() would return bvec4, but vec4->get_scalar_type() would return float. NOTE: This is a candidate for stable branches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Fix INTEL_DEBUG=shader_time for fragment shaders with discards.Kenneth Graunke2013-03-295-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "discard" instructions generate HALT instructions which jump to a final HALT near the end of the shader. Previously, fs_generator created this final jump target when it saw the first FS_OPCODE_FB_WRITE, causing it to jump right before the FB write epilogue. This is normally good. However, INTEL_DEBUG=shader_time also has an epilogue section which records the final timestamp. The frontend emits IR for this just before FS_OPCODE_FB_WRITE. Unfortunately, this led to the following ordering: 1. Shader Time Epilogue 2. Final HALT (where discards jump) 3. Framebuffer Write Epilogue This meant that discarded pixels completely skipped the shader time epilogue, causing no ending timestamp to be written. This obviously led to inaccurate results. This patch adds a new FS_OPCODE_PLACEHOLDER_HALT in the IR stream just before any epilogue sections. This is where the final HALT should be generated, and makes it easy to ensure the correct ordering: 1. Final HALT 2. Shader Time Epilogue 3. Framebuffer Write Epilogue For shaders that don't discard, this opcode compiles away to nothing. The scheduler adds barrier dependencies to make sure that it doesn't get moved above any FS_OPCODE_DISCARD_JUMP instructions. One 8-wide shader in GLBenchmark 2.7 dropped from 2291.67 Gcycles to a mere 5.13 Gcycles. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Add names for all instructions to dump_instruction() in FS and VS.Eric Anholt2013-03-294-25/+113
| | | | | | | I'd previously added the minimum names to understand my dumps, but this makes dumps in general much easier to read. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Enable ARB_texture_query_lod.Matt Turner2013-03-292-2/+4
| | | | | v2: Support Ironlake as well. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Generate LOD sampler message from ir_lod.Matt Turner2013-03-295-1/+20
| | | | | v2: Support Ironlake as well. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Implement ARB_texture_query_lodDave Airlie2013-03-2918-18/+101
| | | | | | | | | | | | | | | | | | | v2 [mattst88]: - Rebase. - #define GL_ARB_texture_query_lod to 1. - Remove comma after ir_lod in ir.h for MSVC. - Handled ir_lod in ir_hv_accept.cpp, ir_rvalue_visitor.cpp, opt_tree_grafting.cpp. - Rename textureQueryLOD to textureQueryLod, see https://www.khronos.org/bugzilla/show_bug.cgi?id=821 - Fix ir_reader of (lod ...). v3 [mattst88]: - Rename textureQueryLod to textureQueryLOD, pending resolution of Khronos 821. - Add ir_lod case to ir_to_mesa.cpp. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Use measured Gen7 instruction timings on Gen6.Matt Turner2013-03-291-1/+4
| | | | | | | | | | | | | | | | | | x before + after +------------------------------------------------------------------------------+ | x x + | | xx ++ x + | | xx ++ + xx ++ | |x xxx x+++++ + xxx x*x+*+++ + x +| | |_____|____________A______A____M____M_|_______| | +------------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 23 8083.78 8287.83 8205.55 8162.7461 68.307951 + 23 8107.56 8358.74 8224.33 8186.1765 71.506301 No difference proven at 95.0% confidence Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Increase and document MAD latency on Gen7.Matt Turner2013-03-291-4/+18
| | | | | | | 58% of mad(8) generated in shader-db are reading registers from the same bank. Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Add LRP instruction latency.Matt Turner2013-03-291-0/+26
| | | | | | | | Set its latency to what happens to be the default floating-point instruction latency. One day we may want to handle latency based on register bank information. Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Add Haswell cycle timingsMatt Turner2013-03-291-9/+9
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: Note that write-after-write dependencies are blocking.Matt Turner2013-03-291-1/+1
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: Reword comment about the shared mathbox.Matt Turner2013-03-291-4/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* gallivm: consolidate some half-to-float and r11g11b10-to-float codeRoland Scheidegger2013-03-293-63/+52
| | | | | | | Similar enough that we can try to use shared code. v2: fix a stupid bug using wrong variable causing mayhem with Inf and NaNs. Reviewed-by: Jose Fonseca <[email protected]
* mesa: provide default implementation of QuerySamplesForFormatChris Forbes2013-03-293-1/+21
| | | | | | | | | | | | | | Previously at least i915 failed to provide an implementation, but exposed ARB_internalformat_query anyway, leading to crashes when QueryInternalformativ was called. Default implementation just returns 1 for everything, so is suitable for any driver which does not support multisampling. V2: - Move from intel to core mesa. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nvc0: implement MP performance countersChristoph Bumiller2013-03-298-6/+556
| | | | | | | | | There's more, but this only adds (most) of the counters that are handled directly by the shader processors. The other counter domains are not handled on the multiprocessor and there are no FIFO object methods for configuring them. Instead, they have to be programmed by the kernel via PCOUNTER, and the interface for this isn't in place yet.
* nvc0: enable compression when supportedChristoph Bumiller2013-03-293-3/+13
|
* nvc0: use NOUVEAU_GETPARAM_GRAPH_UNITS to get MP countChristoph Bumiller2013-03-294-29/+73
|
* nv50,nvc0: fix 3d blits, restore viewport after blitChristoph Bumiller2013-03-292-18/+32
|
* nv50: fix 3D render target setupChristoph Bumiller2013-03-291-2/+10
|
* llvmpipe: put .bmp extension on dumped image filesBrian Paul2013-03-281-2/+2
|
* llvmpipe: add 'f' suffix to 1.0 in fixed_to_float()Brian Paul2013-03-281-1/+1
|
* draw: fix some build breakage when LLVM is not usedBrian Paul2013-03-282-1/+8
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62883 Tested-by: Vinson Lee <[email protected]>
* mesa: handle STATE_CURRENT_ATTRIB_MAYBE_VP_CLAMPED for parameter printingMarek Olšák2013-03-281-0/+3
| | | | Reviewed-by: Brian Paul <[email protected]>
* i965: Tidy shader time printing code by using printf's field widths.Kenneth Graunke2013-03-281-12/+4
| | | | | | | | | | | | | We can use %-6s%-6s rather than manually counting characters, resulting in much more readable code. This necessitates a small secondary change: using "total fs16" and "" now causes the "" string to be padded out to 6 characters, resulting in too much whitespace. Splitting it into "total" and "fs16" produces the same output as before. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* i965/vs: Include URB payload setup in shader_time.Eric Anholt2013-03-282-4/+11
| | | | | | | | This much more accurately reflects the cost of the vertex shader, since the payload setup is often a significant fraction of the instructions in the VS. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Use a send from a 2-register VGRF for shader time writes.Eric Anholt2013-03-282-14/+13
| | | | | | | This will let us emit it later, after we're setting up MRFs for the URB write. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Teach copy propagation about sends from GRFs.Eric Anholt2013-03-283-7/+29
| | | | | | | This incidentally also teaches it a bit about gen6 math -- we now allow unswizzled, unmodified GRF temps as the sources for math. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vs: Prepare split_virtual_grfs() for the presence of SENDs from GRFs.Eric Anholt2013-03-282-20/+45
| | | | | | v2: Fix silly bool handling, and don't add new tabs. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Include everything but the final FB write in shader_time.Eric Anholt2013-03-282-5/+15
| | | | | | | | Previously, if you just wrote a constant color to the render target, no time got noted at all. This is convenient for doing single-instruction timings, but not so much for actual program analysis. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Switch shader_time writes to using GRFs.Eric Anholt2013-03-286-19/+63
| | | | | | | | | This avoids conflicts between shader_time and FB writes, so we can include more of the program under our profiling. This does mean hiding more of the message setup from the optimizer, which doesn't have a way to handle multi-reg sends from GRFs. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Provide more detailed information to match shader_time to programs.Eric Anholt2013-03-281-13/+50
| | | | | | | | | Ken asked me the other day what -1 vs 0 vs 3 vs other meant in our shader names, and I realized that it was really unclear. I'd like to do even better, like noting which one is the clear shader, but that would require exposing the metaops struct to the driver. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Track ARB program state along with GLSL state for shader_time.Eric Anholt2013-03-286-29/+47
| | | | | | This will let us do much better printouts for non-GLSL programs. Reviewed-by: Kenneth Graunke <[email protected]>
* st/dri: fix crash with HUD and single bufferingMarek Olšák2013-03-281-1/+2
|
* st/mesa: remove leftover printfs from ReadPixelsMarek Olšák2013-03-281-3/+0
| | | | Oops, I thought I had removed all debugging code.
* i965/fs: Improve performance of copy propagation dataflow using bitsets.Eric Anholt2013-03-281-33/+34
| | | | | | Reduces compile time of l4d2's slowest shader by 17.8% +/- 1.3% (n=10). Reviewed-by: Kenneth Graunke <[email protected]>
* llvmpipe/draw: Fix texture sampling in geometry shadersZack Rusin2013-03-278-71/+146
| | | | | | | | | We weren't correctly propagating the samplers and sampler views when they were related to geometry shaders. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* draw/llvm: Cleanup the store debugging codeZack Rusin2013-03-271-8/+5
| | | | | | Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* draw: Allocate the output buffer for output primitivesZack Rusin2013-03-271-2/+1
| | | | | | | | | | We were allocating the output buffer but using the input primitives. We need to allocate that buffer using the maximum number of output, not input, primitives. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* gallivm: Implement the breakc instructionZack Rusin2013-03-272-0/+34
| | | | | | | | Required by more modern examples. Like BRK but with a condition. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* gallivm: implement implicit primitive flushingZack Rusin2013-03-272-0/+15
| | | | | | | | | TGSI semantics currently require an implicit endprim at the end of GS if an ending primitive hasn't been emitted. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* gallium/llvm: implement geometry shaders in the llvm pathsZack Rusin2013-03-2710-79/+1285
| | | | | | | | | This commits implements code generation of the geometry shaders in the SOA paths. All the code is there but bugs are likely present. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* draw/gs: Fetch more than one primitive per invocationZack Rusin2013-03-272-13/+48
| | | | | | | | | | Allows executing gs on up to 4 primitives at a time. Will also be required by the llvm code because there we definitely don't want to flush with just a single primitive. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>