summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* ilo: move device limits to ilo_dev_info or to GPEsChia-I Wu2013-05-0110-96/+127
| | | | It seems a bit weird to have device limits in a context.
* ilo: use ilo_dev_info in toy compilerChia-I Wu2013-05-0110-33/+33
| | | | | We need only dev->gen, but it makes sense to expose other information to the compiler.
* ilo: use ilo_dev_info in GPE and 3D pipelineChia-I Wu2013-05-0112-597/+587
| | | | | We need only dev->gen and dev->gt, but it makes sense to expose other information to the pipeline.
* ilo: add ilo_dev_info shared by the screen and contextsChia-I Wu2013-05-019-51/+71
| | | | | The struct is used to describe the device information, such as PCI ID, GEN, GT, and etc.
* ilo: fix indentation of ilo_gpe_gen*.hChia-I Wu2013-05-012-258/+258
|
* glsl: Ignore redundant prototypes after a function's been defined.Kenneth Graunke2013-04-301-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the following shader: vec4 f(vec4 v) { return v; } vec4 f(vec4 v); The prototype exactly matches the signature of the earlier definition, so there's absolutely no point in it. However, it doesn't appear to be illegal. The GLSL 4.30 specification offers two relevant quotes: "If a function name is declared twice with the same parameter types, then the return types and all qualifiers must also match, and it is the same function being declared." "User-defined functions can have multiple declarations, but only one definition." In this case the same function was declared twice, and there's only one definition, which fits both pieces of text. There doesn't appear to be any text saying late prototypes are illegal, so presumably it's valid. Unfortunately, it currently triggers an assertion failure: ir_dereference_variable @ <p1> specifies undeclared variable `v' @ <p2> When we process the second line, we look for an existing exact match so we can enforce the one-definition rule. We then leave sig set to that existing function, and hit sig->replace_parameters(&hir_parameters), unfortunately nuking our existing definition's parameters (which have actual dereferences) with the prototype's bogus unused parameters. Simply bailing out and ignoring such late prototypes is the safest thing to do. Fixes Piglit's late-proto.vert as well as 3DMark/Ice Storm for Android. NOTE: This is a candidate for stable branches. Signed-off-by: Kenneth Graunke <[email protected]> Tested-by: Tapani Pälli <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* build: Remove libpipe_loader.la from GALLIUM_PIPE_LOADER_LIBS.Matt Turner2013-04-303-0/+3
| | | | | | Tested-by: Tom Stellard <[email protected]> Tested-by: Aaron Watry <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* build: Remove HAVE_PIPE_LOADER_SW.Matt Turner2013-04-301-4/+0
| | | | | | | | | | | It guarded the function prototype of pipe_loader_sw_probe, whose use (in pipe_loader.c) and definition (in pipe_loader_sw.c) were not guarded. Both are built into libpipe_loader.la if HAVE_LOADER_GALLIUM, which is enable_gallium_loader in configure.ac. Tested-by: Tom Stellard <[email protected]> Tested-by: Aaron Watry <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* build: Remove libws_null.la from GALLIUM_PIPE_LOADER_LIBS.Matt Turner2013-04-303-0/+3
| | | | | | Tested-by: Tom Stellard <[email protected]> Tested-by: Aaron Watry <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* build: Rename PIPE_LOADER_HAVE_XCB to HAVE_PIPE_LOADER_XCB.Matt Turner2013-04-301-2/+2
| | | | | | | | For consistency, since we already have HAVE_PIPE_LOADER_{SW,DRM}. Tested-by: Tom Stellard <[email protected]> Tested-by: Aaron Watry <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965: Stop passing num_samples to intel_miptree_alloc_hiz().Paul Berry2013-04-303-8/+6
| | | | | | | | | | | | | The number of samples is already available in the miptree data structure, so there's no need to pass it in. I suspect this may fix a subtle bug because in one case (intel_renderbuffer_update_wrapper) we were always passing zero for num_samples, even though the buffer in question was not guaranteed to be single-sampled. But I wasn't able to find a failing test case. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* draw: don't crash if GS doesn't emit anythingZack Rusin2013-04-272-0/+18
| | | | | | | | | | Technically it's legal for geometry shader to not emit any vertices. It's silly, but perfectly legal, so lets make draw stop crashing if it happens. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* i965: Implement color clears using a simple shader in blorp.Eric Anholt2013-04-308-14/+344
| | | | | | | | | | | | | | | | | | | | | | | The upside is less CPU overhead in fiddling with GL error handling, the ability to use the constant color write message in most cases, and no GLSL clear shaders appearing in MESA_GLSL=dump output. The downside is more batch flushing and a total recompute of GL state at the end of blorp. However, if we're ever going to use the fast color clear feature of CMS surfaces, we'll need this anyway since it requires very special state setup. This increases the fail rate of some the GLES3conform ARB_sync tests, because of the initial flush at the start of blorp. The tests already intermittently failed (because it's just a bad testing procedure), and we can return it to its previous fail rate by fixing the initial flush. Improves GLB2.7 performance 0.37% +/- 0.11% (n=71/70, outlier removed). v2: Rename the key member, use the core helper for sRGB, and use BRW_MASK_* enums, fix comment and indentation (review by Paul). v3: Rewrite a comment, drop a silly temporary variable (review by Ken) Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Make a Mesa core function for sRGB render encoding handling.Eric Anholt2013-04-304-41/+36
| | | | | | | | v2: const-qualify ctx, and add a comment about the function (recommended by Brian and Kenneth). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (v1)
* i965: Don't flush the batch at the end of blorp.Eric Anholt2013-04-303-18/+19
| | | | | | | | | | Improves GLB2.7 performance 0.13% +/- 0.09% (n=104/105, outliers removed). More importantly, once color glClear()s are done through blorp in the next commit, this reduces regression in GLES3 conformance tests that rely on queueing up many glClear()s and having the GPU report being still busy in an ARB_sync query after that. Reviewed-by: Kenneth Graunke <[email protected]>
* r600g/sb: remove unused codeVadim Girlin2013-04-302-34/+0
| | | | Signed-off-by: Vadim Girlin <[email protected]>
* r600g/sb: collect shader statisticsVadim Girlin2013-04-305-8/+162
| | | | | | | | | Collects various statistical information for each shader and total stats for contexts. Printed with R600_DEBUG=sb,sbstat Signed-off-by: Vadim Girlin <[email protected]>
* r600g/sb: don't propagate dead values in GVN passVadim Girlin2013-04-301-0/+3
| | | | | | | | | | | | | | In some cases we use value::gvn_source field to link values that are known to be equal before gvn pass (e.g. results of DOT4 in different slots of the same alu group), but then source value may become dead later and this confuses further passes. This patch resets value::gvn_source to NULL in the dce_cleanup pass if it points to dead value. Fixes segfault during shader optimization with ETQW. Signed-off-by: Vadim Girlin <[email protected]>
* r600g/sb: use simple heuristic to limit register pressureVadim Girlin2013-04-302-3/+33
| | | | | | | | | | | | | | | | | | | | | It's not a complete register pressure tracking, yet it helps to prevent register allocation problems in some cases where they were observed. The problems are uncovered by false dependencies between fetch instructions introduced by some recent changes in TGSI and/or default backend. Sometimes we have code like this: ... SAMPLE R5.xyzw, R5.xyzw ... store R5.xyzw somewhere MOV R5.x, <next x coord> MOV R5.y, <next y coord> SAMPLE R5.xyzw, R5.xyzw ... <may be repeated a lot of times> With 2D resources, z and w in SAMPLE src reg aren't used and can be simply masked, but shader backend doesn't have this information, so it's considered as data dependency by optimization algorithms.
* r600g/sb: improve error checking in ra_coalesce passVadim Girlin2013-04-302-14/+27
|
* r600g/sb: use source bytecode in case of optimization errorsVadim Girlin2013-04-305-11/+25
|
* r600g: plug in optimizing backendVadim Girlin2013-04-308-3/+155
| | | | | | Optimization is enabled with "R600_DEBUG=sb". Signed-off-by: Vadim Girlin <[email protected]>
* r600g/sb: initial commit of the optimizing shader backendVadim Girlin2013-04-3035-0/+17498
|
* r600g: use enum type for domains field in struct r600_resourceVadim Girlin2013-04-301-1/+1
| | | | This prevents the problems when the header is included in C++ code.
* r600g: add new flags to isa instruction tablesVadim Girlin2013-04-301-116/+127
|
* r600g: always create reverse lookup isa tablesVadim Girlin2013-04-301-10/+2
|
* r600g: mask unused source components for SAMPLEVadim Girlin2013-04-301-0/+20
| | | | | | | | This results in more clean shader code and may improve the quality of optimized code produced by r600-sb due to eliminated false dependencies in some cases. Signed-off-by: Vadim Girlin <[email protected]>
* intel: Remove the last spans code!Eric Anholt2013-04-3011-148/+6
| | | | | | | | The remaining bits happen to do nothing that _swrast_span_render_start()/finish() don't do. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* intel: Move the S8 offset calc function near its remaining usage.Eric Anholt2013-04-303-58/+56
| | | | | | | It's not really span code ever since we stopped using spans for S8. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* intel: Ensure renderbuffers are current when mapping them.Eric Anholt2013-04-301-6/+1
| | | | | | | | | | | | In the case of renering to windows in X, we would render to stale buffers (or not render at all!) if you hit a MapRenderbuffer as the first thing done to your window after new buffers are ready to be collected in DRI2. I think this also covers the weird comment about irb->mt being missing sometimes. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add a clarifying comment about rowStride of compressed textures.Eric Anholt2013-04-301-1/+3
| | | | | | | I always forget how we do this for compressed textures. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Remove the Map field from texture images.Eric Anholt2013-04-301-1/+0
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Always use MapTextureImage for mapping textures for swrast.Eric Anholt2013-04-3011-300/+64
| | | | | | | | | | | | | | | Now that everything goes through ImageSlices[], we can rely on the driver's existing texture mapping function. A big block of code goes away on Radeon that looks like it was to deal with the validate that happened at SpanRenderStart, which no longer occurs since we don't need validation for the MapTextureImage hook. v2: Rewrite comment about ImageSlices, fix duplicated swImages, touch up unmap loop. Reviewed-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Brian Paul <[email protected]>
* nouveau: Replace swrast_texture_image->Map usage with ->Buffer.Eric Anholt2013-04-301-3/+1
| | | | | | | | This code is trying to deal with providing a map in the case that AllocTexImageBuffer was called, which is hooked up to the swrast variant. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* nouveau: Just use MapTextureImage instead of duplicating the logic.Eric Anholt2013-04-301-81/+18
| | | | | | | | MapTextureImage has the exact same logic, except it can also handle swrast-allocated buffers. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Make a teximage's stored RowStride be in terms of bytes per row.Eric Anholt2013-04-306-9/+30
| | | | | | | | | | | | | For hardware drivers with pitch alignment requirements, a non-power-of-two-sized texture format won't end up being an integer number of pixels per row. Also, avoids having to change our units between MapTextureImage's rowStride and swrast's RowStride. This doesn't fully convert the compressed texel fetch path, but does make sure we don't drop any bits (not that we'd expect to). Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Replace use of teximage Map in 1D/2D paths with ImageSlices[0].Eric Anholt2013-04-303-8/+8
| | | | | | | This gets us ready for the Map field to die. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Replace ImageOffsets with an ImageSlices pointer.Eric Anholt2013-04-3013-185/+123
| | | | | | | | | | | | | This is a step toward allowing drivers to use their normal mapping paths, instead of requiring that all slice mappings come from an aligned offset from the first slice's map. This incidentally fixes missing slice handling in FXT1 swrast. v2: Use slice height helper function. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Reuse _swrast_free_texture_image_buffer from drivers.Eric Anholt2013-04-302-15/+2
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Move ImageOffsets allocation to shared code.Eric Anholt2013-04-304-44/+17
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Clean up and explain the mapping process.Eric Anholt2013-04-302-10/+17
| | | | | | | v2: Move slice height calculation to a helper function (recommeded by Brian). Reviewed-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Brian Paul <[email protected]>
* swrast: Factor out texture slice counting.Eric Anholt2013-04-301-4/+12
| | | | | | | This function going to get used a lot more in upcoming patches. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radeon: Remove some dead teximage mapping code.Eric Anholt2013-04-302-52/+0
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radeon: Add missing swrast field initialization.Eric Anholt2013-04-301-0/+3
| | | | | | | | This is the equivalent of intel's 80513ec8b4c812b9c6249cc5824337a5f04ab34c. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* r600g/llvm: Fix opencl buildVincent Lejeune2013-04-301-1/+1
|
* Gallium: Use mmap on Haiku for executable memory vs mallocAlexander von Gluck IV2013-04-291-1/+1
| | | | * Haiku now has DEP enabled by default.
* Mapi: Use mmap on Haiku for executable memory vs mallocAlexander von Gluck IV2013-04-291-1/+1
| | | | * Haiku now has DEP enabled by default.
* Mesa: Use mmap on Haiku for executable memory vs mallocAlexander von Gluck IV2013-04-291-1/+1
| | | | * Haiku now has DEP enabled by default.
* r600g/llvm: get use_kill from compiler shaderVincent Lejeune2013-04-304-2/+9
|
* i965/fs: Print out the estimated cycle count in INTEL_DEBUG=wmEric Anholt2013-04-291-0/+5
| | | | | | | This could be used by shader-db for hopefully more accurate regression testing. Reviewed-by: Kenneth Graunke <[email protected]>