aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i965: pass indirect buffer to primitive restart checkChris Forbes2013-11-253-6/+9
| | | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: implement indirect drawing for Gen7Chris Forbes2013-11-251-2/+55
| | | | | | | | | | | | | | | | | | | | Just prior to emitting the 3DPRIMITIVE command, we load each of the indirect registers. The values loaded are either from offsets into the current indirect BO, or constant zero if the parameter is not used for this draw. Enabling use of the indirect registers is done by turning on a bit in the first dword of the 3DPRIMITIVE command itself. V3: - Deduplicate the common part of both indexed and nonindexed indirect setup. - Just refer to the indirect bo out of the context directly. V4: - Fix bo reference to specify the range we care about. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Add new defines for indirect drawsChris Forbes2013-11-252-0/+9
| | | | | | | | | - MMIO registers for draw parameters - New bit in 3DPRIMITIVE command to enable indirection Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* vbo: Flesh out implementation of indirect drawsChris Forbes2013-11-251-0/+218
| | | | | | | | | Based on part of Patch 2 of Christoph Bumiller's ARB_draw_indirect series. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add indirect_offset, is_indirect to _mesa_primChris Forbes2013-11-254-1/+12
| | | | | | | | | V3: Add missing cases V4: Add indirect_offset here too Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Add validation helpers for new indirect drawsChris Forbes2013-11-252-0/+218
| | | | | | | | | | | | | | | | | Based on part of Patch 2 of Christoph Bumiller's ARB_draw_indirect series. V3: - Disallow primcount==0 for DrawMulti*Indirect. The spec is unclear on this, but it's silly. We might go back on this later if it turns out to be a problem. - Make it clear that the caller has dealt with stride==0 V4: - Allow primcount==0 again. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Add binding point for indirect bufferChris Forbes2013-11-254-0/+22
| | | | | | | | Based on part of Patch 2 of Christoph Bumiller's ARB_draw_indirect series. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Add extension scaffolding for ARB_draw_indirectChris Forbes2013-11-253-0/+4
| | | | | | | | | | | We will reuse the same extension flag for ARB_multi_draw_indirect since it can always be supported by looping. Based on part of Patch 2 of Christoph Bumiller's ARB_draw_indirect series. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glapi: add plumbing for GL_ARB_draw_indirect and GL_ARB_multi_draw_indirectChris Forbes2013-11-255-5/+88
| | | | | | | | Based on part of Patch 2 of Christoph Bumiller's ARB_draw_indirect series. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add indirect drawing buffer parameter to draw functionsChristoph Bumiller2013-11-2518-27/+39
| | | | | | | | | | | | Split from patch implementing ARB_draw_indirect. v2: Const-qualify the struct gl_buffer_object *indirect argument. v3: Fix up some more draw calls for new argument. v4: Fix up rebase conflicts in i965. v5: Undo const-qualification Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* docs/llvmpipe: Add one other good reference.José Fonseca2013-11-251-1/+2
|
* docs: describe the INTEL_* envvars that do existChris Forbes2013-11-251-0/+32
| | | | | | | | V2: drop description of `fall` and `wm`, which have been removed by the previous patch; describe `stats`. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* drop old INTEL_DEBUG names for `perf` (fall) and `fs` (wm)Chris Forbes2013-11-251-2/+0
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: remove unused DEBUG_IOCTLChris Forbes2013-11-252-2/+0
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* radeon: change last instance of DEBUG_IOCTL to use RADEON_IOCTLChris Forbes2013-11-251-1/+1
| | | | | | | | | DEBUG_IOCTL comes from i965, and is about to be removed. Both defines have the same value (4). Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* docs: drop INTEL_* envvars which no longer existChris Forbes2013-11-251-4/+0
| | | | | | | These were removed back in 2012. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* docs: bump supported shading language versionChris Forbes2013-11-251-1/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: respect higher GLSL levels. (v2)Dave Airlie2013-11-251-7/+3
| | | | | | | Limit the max glsl version level to what the state tracker supports. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: Improve error message when attemping assignment to unsized arrayTimothy Arceri2013-11-231-2/+8
| | | | | | | | V2: Return after error to avoid cascading error messages and removed redundant "to" from error message Signed-off-by: Timothy Arceri <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* intel: enable GL_AMD_vertex_shader_layer extension for gen7+Jordan Justen2013-11-231-0/+1
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* radeonsi: implement MSAA for CIKMarek Olšák2013-11-233-11/+28
| | | | | | There are also some changes to the printfs. Reviewed-and-Tested-by: Michel Dänzer <[email protected]>
* radeonsi: enable 2D tiling on CIKMarek Olšák2013-11-232-5/+1
| | | | | | libdrm does the DRM version check and decides if 2D tiling is used. Reviewed-and-Tested-by: Michel Dänzer <[email protected]>
* mesa: initialize gl_renderbuffer::Depth in coreMarek Olšák2013-11-233-4/+1
| | | | | Reviewed-by: Ian Romanick <[email protected]> Tested-by: Ian Romanick <[email protected]>
* i965/fs: Make the first pre-allocation heuristic be the post heuristic.Eric Anholt2013-11-223-23/+44
| | | | | | | | | | | | | | | | | | | | I recently made us try two different things that tried to reduce register pressure so that we would be more likely to allocate successfully. But now that we have the logic for trying two, we can make the first thing we try be the normal, not-prioritizing-register-pressure heuristic. This means one less scheduling pass in the common case of that heuristic not producing spills, plus the best schedule we know how to produce, if that one happens to succeed. This is important, because our register allocation produces a lot of possibly avoidable dependencies for the post-register-allocation schedule, despite ra_set_allocate_round_robin(). GLB2.7: 1.04127% +/- 0.732461% fps improvement (n=31) nexuiz: No difference (n=5) lightsmark: 0.838512% +/- 0.300147% fps improvement (n=86) minecraft apitrace: No difference (n=15) Reviewed-by: Jordan Justen <[email protected]>
* mesa: Remove the ralloc canary on release builds.Eric Anholt2013-11-221-0/+6
| | | | | | | | | The canary is basically just to give a better debugging message when you ralloc_free() something that wasn't rallocated. Reduces maximum memory usage of apitrace replay of the dota2 demo by 60MB on my 64-bit system (so half that on a real 32-bit dota2 environment). Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Fix streamed state dumping/annotation after the blorp-flush change.Eric Anholt2013-11-221-1/+0
| | | | | | | | | I think I was thinking of the batch command packet cache when I pasted this in, but this counter is only used for dumping out streamed state for INTEL_DEBUG=batch and for putting annotations in our aub files. Cc: "10.0" <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Let driconf clamp_max_samples affect context versionChad Versace2013-11-221-40/+20
| | | | | | | | | | | | | | | | | | | | | | | Commit 2f89662 added the driconf option 'clamp_max_samples'. In that commit, the option did not alter the context version. The neglect to alter the context version is a fatal issue for some apps. For example, consider running Chromium with clamp_max_samples=0. Pre-patch, Mesa creates a GL 3.0 context but clamps GL_MAX_SAMPLES to 0. This violates the GL 3.0 spec, which requires GL_MAX_SAMPLES >= 4. The spec violation causes WebGL context creation to fail in many scenarios because Chromium correctly assumes that a GL 3.0 context supports at least 4 samples. Since the driconf option was introduced largely for Chromium, the issue really needs fixing. This patch fixes calculation of the context version to respect the post-clamped value of GL_MAX_SAMPLES. This in turn fixes WebGL on Chromium when clamp_max_samples=0. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* i965: Share code between intel_quantize_num_samples and clamp_max_samplesChad Versace2013-11-224-40/+37
| | | | | | | | | | | | | | | | | | clamp_max_samples() and intel_quantize_num_samples() each maintained their own list of which MSAA modes the hardware supports. This patch removes the duplication by making intel_quantize_num_samples() use the same list as clamp_max_samples(), the list maintained in brw_supported_msaa_modes(). By removing the duplication, we prevent the scenario where someone updates one list but forgets to update the other. Move function `brw_context.c:static brw_supported_msaa_modes()` to `intel_screen.c:(non-static) intel_supported_msaa_modes()` and patch intel_quantize_num_samples() to use the list returned by that function. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* i965: Terminate brw_supported_msaa_modes() list with -1, not 0Chad Versace2013-11-221-5/+6
| | | | | | | | This simplifies the loop logic in a subsqequent patch that refactors intel_quantize_num_samples() to use brw_supported_msaa_modes(). Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* st/mesa: simplify writemask for emitting fog resultBrian Paul2013-11-222-2/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* mesa: fix indentation in ffvertex_prog.cBrian Paul2013-11-221-12/+14
| | | | Reviewed-by: Roland Scheidegger <[email protected]>
* tgsi: Prevent emission of instructions with empty writemask.José Fonseca2013-11-222-0/+42
| | | | | | | These degenerate instructions can often be emitted by state trackers when the semantics of instructions don't match precisely. Reviewed-by: Brian Paul <[email protected]>
* tgsi: Rework calls to ureg_emit_insn().José Fonseca2013-11-221-96/+104
| | | | | | Mere syntactical change. Reviewed-by: Brian Paul <[email protected]>
* docs: Add a section with recommended reading for llvmpipe development.José Fonseca2013-11-221-2/+56
| | | | | | | Several of links the were contributed by Keith Whitwell and Roland Scheidegger. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: (trivial) disable new accurate origin calculationRoland Scheidegger2013-11-221-1/+1
| | | | It looks like there's some bugs in it...
* meta: Move declaration before code.Vinson Lee2013-11-211-1/+2
| | | | | | | | | | | | | | Fixes MSVC build. meta.c(2411) : error C2143: syntax error : missing ';' before 'type' meta.c(2411) : error C2143: syntax error : missing ')' before 'type' meta.c(2411) : error C2065: 'layer' : undeclared identifier meta.c(2411) : error C2059: syntax error : ')' meta.c(2411) : error C2143: syntax error : missing ';' before '{' meta.c(2413) : error C2065: 'layer' : undeclared identifier meta.c(2415) : error C2065: 'layer' : undeclared identifier Signed-off-by: Vinson Lee <[email protected]>
* mesa: Implement GL_FRAMEBUFFER_ATTACHMENT_LAYERED query.Paul Berry2013-11-211-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | From section 6.1.18 (Renderbuffer Object Queries) of the GL 3.2 spec, under the heading "If the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is TEXTURE, then": If pname is FRAMEBUFFER_ATTACHMENT_LAYERED, then params will contain TRUE if an entire level of a three-dimesional texture, cube map texture, or one-or two-dimensional array texture is attached. Otherwise, params will contain FALSE. Fixes piglit tests: - spec/!OpenGL 3.2/layered-rendering/framebuffer-layered-attachments - spec/!OpenGL 3.2/layered-rendering/framebuffertexture-defaults Cc: "10.0" <[email protected]> Reviewed-by: Chris Forbes <[email protected]> v2: Don't include "EXT" in the error message, since this query only makes sensen in context versions that have adopted glGetFramebufferAttachmentParameteriv(). Reviewed-by: Ian Romanick <[email protected]>
* mesa: Fix texture target validation for glFramebufferTexture()Paul Berry2013-11-211-12/+47
| | | | | | | | | | | | | | | | | | | Previously we were using the code path for validating glFramebufferTextureLayer(). But glFramebufferTexture() allows additional texture types. Fixes piglit tests: - spec/!OpenGL 3.2/layered-rendering/gl-layer-cube-map - spec/!OpenGL 3.2/layered-rendering/framebuffertexture Cc: "10.0" <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Chris Forbes <[email protected]> v2: Clarify comment above framebuffer_texture(). Reviewed-by: Ian Romanick <[email protected]>
* i965: Fix fast clear of depth buffers.Paul Berry2013-11-211-2/+10
| | | | | | | | | | | | | | | | | From section 4.4.7 (Layered Framebuffers) of the GLSL 3.2 spec: When the Clear or ClearBuffer* commands are used to clear a layered framebuffer attachment, all layers of the attachment are cleared. This patch fixes the fast depth clear path. Fixes piglit test "spec/!OpenGL 3.2/layered-rendering/clear-depth". Cc: "10.0" <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: Fix blorp clear of layered framebuffers.Paul Berry2013-11-211-7/+19
| | | | | | | | | | | | | | | | | From section 4.4.7 (Layered Framebuffers) of the GLSL 3.2 spec: When the Clear or ClearBuffer* commands are used to clear a layered framebuffer attachment, all layers of the attachment are cleared. This patch fixes the blorp clear path for color buffers. Fixes piglit test "spec/!OpenGL 3.2/layered-rendering/clear-color". Cc: "10.0" <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* i965: refactor blorp clear code in preparation for layered clears.Paul Berry2013-11-211-53/+66
| | | | | | | Cc: "10.0" <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* meta: fix meta clear of layered framebuffersPaul Berry2013-11-211-3/+48
| | | | | | | | | | | | | | | | | | | From section 4.4.7 (Layered Framebuffers) of the GLSL 3.2 spec: When the Clear or ClearBuffer* commands are used to clear a layered framebuffer attachment, all layers of the attachment are cleared. This patch fixes meta clears to properly clear all layers of a layered framebuffer attachment. We accomplish this by adding a geometry shader to the meta clear program which sets gl_Layer to a uniform value. When clearing a layered framebuffer, we execute in a loop, setting the uniform to point to each layer in turn. Cc: "10.0" <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa: Track number of layers in layered framebuffers.Paul Berry2013-11-215-6/+21
| | | | | | | | | | | | | | | | | | | | In order to properly clear layered framebuffers, we need to know how many layers they have. The easiest way to do this is to record it in the gl_framebuffer struct when we check framebuffer completeness. This patch replaces the gl_framebuffer::Layered boolean with a gl_framebuffer::NumLayers integer, which is 0 if the framebuffer is not layered, and equal to the number of layers otherwise. v2: Remove gl_framebuffer::Layered and make gl_framebuffer::NumLayers always have a defined value. Fix factor of 6 error in the number of layers in a cube map array. Cc: "10.0" <[email protected]> Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* nvc0: inform kernel about buffers that screen_create touchesBen Skeggs2013-11-221-0/+2
| | | | | | | Prevents a GPU page fault if somehow the uniform bo gets evicted before the screen_create pushbuf has been submitted. Signed-off-by: Ben Skeggs <[email protected]>
* radeonsi/compute: Fix LDS size calculationTom Stellard2013-11-211-1/+16
| | | | | | We need to include the number of LDS bytes allocated by the state tracker. CC: "10.0" <[email protected]>
* r600g/compute: Add a work-around for flushing issues on CaymanTom Stellard2013-11-213-1/+17
| | | | | | | | | Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]> https://bugs.freedesktop.org/show_bug.cgi?id=69321 CC: "10.0" <[email protected]>
* glsl: Fix interstage uniform interface block link error detection.Paul Berry2013-11-213-32/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we checked for interstage uniform interface block link errors in validate_interstage_interface_blocks(), which is only called on pairs of adjacent shader stages. Therefore, we failed to detect uniform interface block mismatches between non-adjacent shader stages. Before the introduction of geometry shaders, this wasn't a problem, because the only supported shader stages were vertex and fragment shaders, therefore they were always adjacent. However, now that we allow a program to contain vertex, geometry, and fragment shaders, that is no longer the case. Fixes piglit test "skip-stage-uniform-block-array-size-mismatch". Cc: "10.0" <[email protected]> v2: Rename validate_interstage_interface_blocks() to validate_interstage_inout_blocks() to reflect the fact that it no longer validates uniform blocks. Reviewed-by: Jordan Justen <[email protected]> v3: Make validate_interstage_inout_blocks() skip uniform blocks. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Fix cross-version linking between VS and GS.Paul Berry2013-11-211-4/+23
| | | | | | | | | | | | | | | | | | | Previously, when attempting to link a vertex shader and a geometry shader that use different GLSL versions, we would sometimes generate a link error due to the implicit declaration of gl_PerVertex being different between the two GLSL versions. This patch fixes that problem by only requiring interface block definitions to match when they are explicitly declared. Fixes piglit test "shaders/version-mixing vs-gs". Cc: "10.0" <[email protected]> v2: In the interface_block_definition constructor, move the assignment to explicitly_declared after the existing if block. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Prohibit illegal mixing of redeclarations inside/outside gl_PerVertex.Paul Berry2013-11-215-1/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From section 7.1 (Built-In Language Variables) of the GLSL 4.10 spec: Also, if a built-in interface block is redeclared, no member of the built-in declaration can be redeclared outside the block redeclaration. We have been regarding this text as a clarification to the behaviour established for gl_PerVertex by GLSL 1.50, so we apply it regardless of GLSL version. This patch enforces the rule by adding an enum to ir_variable to track how the variable was declared: implicitly, normally, or in an interface block. Fixes piglit tests: - gs-redeclares-pervertex-out-after-global-redeclaration.geom - vs-redeclares-pervertex-out-after-global-redeclaration.vert - gs-redeclares-pervertex-out-after-other-global-redeclaration.geom - vs-redeclares-pervertex-out-after-other-global-redeclaration.vert - gs-redeclares-pervertex-out-before-global-redeclaration - vs-redeclares-pervertex-out-before-global-redeclaration Cc: "10.0" <[email protected]> v2: Don't set "how_declared" redundantly in builtin_variables.cpp. Properly clone "how_declared". Reviewed-by: Ian Romanick <[email protected]>
* i965: Enable the AMD_performance_monitor extension on Gen5+.Kenneth Graunke2013-11-211-0/+61
| | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>