summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* i965: Move intel_context::max_gtt_map_object_size to brw_context.Kenneth Graunke2013-07-094-5/+5
| | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Move intel_context::perf_debug to brw_context.Kenneth Graunke2013-07-0923-39/+20
| | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Move intel_context::no_batch_wrap to brw_context.Kenneth Graunke2013-07-094-6/+4
| | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Move intel_context's framerate throttling fields to brw_context.Kenneth Graunke2013-07-095-15/+17
| | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Move intel_context::stats_wm to brw_context.Kenneth Graunke2013-07-096-8/+7
| | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Move intel_context::batch to brw_context.Kenneth Graunke2013-07-0933-206/+170
| | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Move intel_context::hw_ctx to brw_context.Kenneth Graunke2013-07-097-13/+11
| | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Move intel_context::bufmgr to brw_context.Kenneth Graunke2013-07-0914-38/+29
| | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Move intel_context's driconf flags to brw_context.Kenneth Graunke2013-07-095-18/+21
| | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Move intel_context::reduced_primitive to brw_context.Kenneth Graunke2013-07-096-8/+8
| | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Move front buffer rendering fields from intel_context to brw.Kenneth Graunke2013-07-098-53/+52
| | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Move intel_context::vtbl to brw_context.Kenneth Graunke2013-07-099-85/+79
| | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Move intel_context::optionCache to brw_context.Kenneth Graunke2013-07-095-17/+17
| | | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Pass brw_context to functions rather than intel_context.Kenneth Graunke2013-07-0977-777/+782
| | | | | | | | | | | | | | This makes brw_context available in every function that used intel_context. This makes it possible to start migrating fields from intel_context to brw_context. Surprisingly, this actually removes some code, as functions that use OUT_BATCH don't need to declare "intel"; they just use "brw." Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Remove pointless intel_context parameter from try_copy_propagate.Kenneth Graunke2013-07-092-5/+3
| | | | | | | | | It's already part of the visitor class. Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Add forward declarations of brw_context to a few places.Kenneth Graunke2013-07-092-0/+2
| | | | | | | | | | | These files have forward declarations for intel_context. This makes brw_context available in the same places without further #include monkeying. Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Replace #include "intel_context.h" with brw_context.h.Kenneth Graunke2013-07-0929-29/+23
| | | | | | | | | | | brw_context.h includes intel_context.h, but additionally makes the brw_context structure available. Switching this allows us to start using brw_context in more places. Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Move ctx->Const setup from intelInitContext to the new helper.Kenneth Graunke2013-07-092-25/+21
| | | | | | | | | | This also requires moving _mesa_init_point() to after the ctx->Const initialization. Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Split code to set ctx->Const values into a helper function.Kenneth Graunke2013-07-091-110/+120
| | | | | | | | | | | brwCreateContext() has a lot of random things to do. Factoring out the part that initializes ctx->Const values and shader compiler options makes the main function a bit easier to read. Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i915: Remove i965+ chip names.Kenneth Graunke2013-07-091-1/+0
| | | | | | | | | i965+ chipsets shouldn't ever hit this driver. Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Remove i915 chip names.Kenneth Graunke2013-07-091-1/+0
| | | | | | | | | i915 chipsets shouldn't ever hit this driver. Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Replace intel_context:needs_ff_sync with intel->gen == 5.Kenneth Graunke2013-07-096-14/+8
| | | | | | | | | | | | | Technically, needs_ff_sync was set on Gen5+, but it was only consulted in the clipper threads and quad/lineloop decomposition code, which are both Gen4-5 only. So in reality it only identified Ironlake. The named flag doesn't really clarify things, and seems like overkill. Signed-off-by: Kenneth Graunke <[email protected]> Acked-by: Chris Forbes <[email protected]> Acked-by: Paul Berry <[email protected]> Acked-by: Anuj Phogat <[email protected]>
* i965: Add missing newline to blorp color clear perf_debug message.Kenneth Graunke2013-07-091-1/+1
| | | | | | | perf_debug() doesn't add a newline for you; without this, all the INTEL_DEBUG=perf output was jumbled together. Signed-off-by: Kenneth Graunke <[email protected]>
* i965: Add an assertion to brwProgramStringNotify.Paul Berry2013-07-081-2/+16
| | | | | | | | | | | | driver->ProgramStringNotify is only called for ARB programs, fixed function vertex programs, and ir_to_mesa (which isn't used by the i965 back-end). Therefore, even after geometry shaders are added, brwProgramStringNotify should only ever be called with a target of GL_VERTEX_PROGRAM_ARB or GL_FRAGMENT_PROGRAM_ARB. This patch adds an assertion to clarify that. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: fix alpha test for MRTChris Forbes2013-07-064-10/+9
| | | | | | | | | | | | | | | | | Include src0 alpha in the RT write message when using MRT, so it is used for the alpha test instead of the normal per-RT alpha value. Fixes broken rendering in Dota2 under Wine [FDO #62647]. No Piglit regressions on Ivybridge. V2: reuse (and simplify) existing sample_alpha_to_coverage flag in the FS key, rather than adding another redundant one. Signed-off-by: Chris Forbes <[email protected]> Reviewd-by: Paul Berry <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62647 NOTE: This is a candidate for the stable branches.
* i965: Move the rest of intel_tex_layout.c into brw_tex_layout.c.Kenneth Graunke2013-07-036-191/+102
| | | | | | | | | | | The texture alignment unit functions are called from brw_tex_layout.c, so it makes sense to put them there. Since the only caller of intel_get_texture_alignment_unit() is in brw_tex_layout.c, it could be made into a static function. However, this patch instead simply folds it into the caller, as it's only two lines anyway. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Push intel_get_texture_alignment_unit call into brw_miptree_layoutKenneth Graunke2013-07-032-3/+3
| | | | | | | | | | | | | | intel_miptree_create_layout() calls intel_get_texture_alignment_unit() and then immediately calls brw_miptree_layout(). There are no other callers. intel_get_texture_alignment_unit() populates the miptree's alignment unit fields, which are used by brw_miptree_layout() to determine where to place each miplevel. Since brw_miptree_layout() needs those to be present, it makes sense to have it initialize them as the first step. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Declare for-loop counters in the loop in brw_tex_layout.c.Kenneth Graunke2013-07-031-11/+7
| | | | | | | | The driver is compiled in C99 mode, so this is not a problem. It's slighlty tidier. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Remove use of GLuint/GLint in brw_tex_layout.c.Kenneth Graunke2013-07-031-19/+19
| | | | | | | Using GL types is silly; this isn't even remotely API-facing. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Tidy the brw_tex_layout.c copyright and file header comments.Kenneth Graunke2013-07-031-34/+31
| | | | | | | | This uses Doxygen style for the file comments, and generally makes it more consistent with the rest of the driver. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Move i945_texture_layout_2d to brw_tex_layout.cKenneth Graunke2013-07-033-71/+72
| | | | | | | This consolidates the miptree layout logic in a single file. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Remove fallthrough for Gen4 cube map layout.Kenneth Graunke2013-07-031-9/+7
| | | | | | | | | | | | | | | Now that both 2DArray and Cube layouts are taken care of by helper functions, it's easy to just call the right function for each generation. This is a little cleaner than falling through. This also reworks the comments. Referencing "Volume 1" of the BSpec isn't very helpful, since that's only available inside Intel, and it doesn't even use volume numbers. Also, "Ironlake...finally" sounds a bit strange considering that almost all hardware uses the 2D array approach. At this point, Gen4 is the only special case. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Combine GL_TEXTURE_CUBE_MAP_ARRAY case with the other array cases.Kenneth Graunke2013-07-031-5/+2
| | | | | | | These do the exact same thing; combining them is tidier. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Pull 3D texture layout code out into a helper function.Kenneth Graunke2013-07-031-77/+82
| | | | | | | A bit cleaner than having it in one giant function. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Replace maxBatchSize variable with BATCH_SZ define.Kenneth Graunke2013-07-034-5/+3
| | | | | | | | maxBatchSize was only ever initialized to BATCH_SZ, and a few places used BATCH_SZ directly anyway. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Move annotate_aub out of the vtable.Kenneth Graunke2013-07-033-5/+2
| | | | | | | | brw_annotate_aub() is the only implementation of this function, so it makes sense to just call it directly. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Move debug_batch hook out of the vtable.Kenneth Graunke2013-07-033-4/+2
| | | | | | | | brw_debug_batch() is the only implementation of this function, so it makes sense to just call it directly. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Remove render_target_supported from the vtable.Kenneth Graunke2013-07-035-6/+3
| | | | | | | | | | | | brw_render_target_supported() is the only implementation of this function, so it makes sense to just call it directly. Rather than adding an #include of brw_wm.h, this patch moves the prototype to brw_context.h. Prototypes seem to be in rather arbitrary places at the moment, and either place seems as good as the other. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Move is_hiz_depth_format out of the vtable.Kenneth Graunke2013-07-036-31/+26
| | | | | | | | brw_is_hiz_depth_format() is the only implementation of this function, so it makes sense to just call it directly. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Remove the invalidate_state() vtable hook.Kenneth Graunke2013-07-033-12/+0
| | | | | | | The hook was a noop. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Replace fprintfs with assertions in GLenum comparison translators.Kenneth Graunke2013-07-031-2/+2
| | | | | | | | | | | These functions translate GLenum comparison operations into the hardware enumerations. They should never be passed something other than a GL comparison operator, or something is very broken. Assertions seem more appropriate than fprintf. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Replace intel_state.c enums with those from brw_defines.h.Kenneth Graunke2013-07-033-102/+46
| | | | | | | | | | | | Both intel_context.h and brw_defines.h have #defines for comparison functions, stencil ops, blending logic ops, and blending factors. They're exactly the same values, so it makes sense to pick one. brw_defines.h is the logical place for this kind of stuff, so this patch converts intel_state.c to use the set defined there. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Delete pre-DRI2.3 viewport hacks.Kenneth Graunke2013-07-033-25/+1
| | | | | | | | | | The __DRI_USE_INVALIDATE extension was added in May 11th, 2010 by commit 4258e3a2e1c327. At this point, it's unlikely that anyone's using the right mix of new and old components to hit this path. Deleting it removes an untested code path and cleans up the driver a bit. Cc: Kristian Høgsberg <[email protected]> Cc: Keith Packard <[email protected]>
* i965: Remove "There are probably better ways" comment.Kenneth Graunke2013-07-031-5/+0
| | | | | | | There are always better ways to do things. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Delete brw_print_reg() function.Kenneth Graunke2013-07-033-99/+0
| | | | | | | | | | This wasn't called from anywhere; presumably it was used to examine brw_regs when debugging shader assembly. However, it prints registers in a different notation than brw_disasm.c which everyone is used to...which means I doubt anyone will want to use it. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Move contents of intel_clear.h to intel_context.h.Kenneth Graunke2013-07-034-40/+2
| | | | | | | | | Having a header file for a single prototype seems rather excessive. Plus, the actual function is in brw_clear.c, not intel_clear.c, so there isn't even the .c/.h filename symmetry one might expect. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Move contents of intel_extensions.h to intel_context.h.Kenneth Graunke2013-07-034-37/+3
| | | | | | | | Having an entire header file for a single prototype seems a bit excessive. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Remove some dead code.Kenneth Graunke2013-07-0317-228/+0
| | | | | | | A random smattering of things that just aren't used anymore. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Delete dead intel_buffer_object::range_map_size field.Kenneth Graunke2013-07-031-1/+0
| | | | | | | Nothing uses this, apparently. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Remove intel_buffer_object::source.Kenneth Graunke2013-07-032-6/+0
| | | | | | | | | This was only used for BOs backed by system memory on i915. With that gone, there's nothing that even sets source to non-zero, so this is purely dead code. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>