summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Remove support for unpacking from client memory to color-index pixelsIan Romanick2011-09-061-40/+12
| | | | | | | Mesa hasn't supported color-index rendering for a long time. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* swrast: Use GL_STENCIL_INDEX for address calculationsIan Romanick2011-09-061-1/+1
| | | | | | | | | GL_COLOR_INDEX produced the same result (because GL_BITMAP is always used for stencil glDrawPixels), but it was confusing to read. I spent about 15 minutes wondering, "WTF?" Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove GL_COLOR_INDEX from _mesa_{dest,source}_buffer_existsIan Romanick2011-09-061-2/+0
| | | | | | | Mesa hasn't supported color-index rendering for a long time. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove GL_COLOR_INDEX from base format assertionsIan Romanick2011-09-061-2/+0
| | | | | | | | _mesa_make_temp_float_image can't work on color-index textures, but there is no such thing as a color-index texture anymore. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* swrast: Remove GL_COLOR_INDEX from assertionsIan Romanick2011-09-061-4/+0
| | | | | | | | These sampling functions don't work on color-index textures, but there is no such thing as a color-index texture anymore. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove unused struct gl_color_tableIan Romanick2011-09-062-20/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove unused functions _mesa_lookup_rgba_{float,ubyte}Ian Romanick2011-09-062-270/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove all mention of GL_COLOR_INDEX*_EXTIan Romanick2011-09-063-36/+2
| | | | | | | | These enums were only valid with the paletted texture extensions. This allows a couple other trivial clean-ups. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove dd_function_table::CopyColorTable, ::CopyColorSubTable, and ↵Ian Romanick2011-09-064-103/+0
| | | | | | | | | | ::UpdateTexturePalette There's nothing left that can call any of these functions. This also removes the meta-ops code that implemented the first two. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove API facing bits of EXT_paletted_texture and ↵Ian Romanick2011-09-0613-817/+27
| | | | | | | | | | | | | | EXT_shared_texture_palette This was also discussed at XDS 2010. However, actually making the change was delayed because several drivers still exposed these extensions to significant benefit (e.g., tdfx). Now that those drivers have been removed, this code can be removed as well. v2: A lot of bits that were missed in the previous patch have been removed. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Remove two_side_color from brw_compute_vue_map().Paul Berry2011-09-0612-22/+11
| | | | | | | | | | | Since we now lay out the VUE the same way regardless of whether two-sided color is enabled, brw_compute_vue_map() no longer needs to know whether two-sided color is enabled. This allows the two-sided color flag to be removed from the clip, GS, and VS keys, so that fewer GPU programs need to be recompiled when turning two-sided color on and off. Reviewed-by: Eric Anholt <[email protected]>
* i965: For GEN6+, always make front/back colors adjacent in VUE.Paul Berry2011-09-061-16/+12
| | | | | | | | | | | | | | | | | | When doing two-sided color on GEN6+, we use the SF unit's INPUTATTR_FACING mode to cause front colors to be used on front-facing triangles, and back colors to be used on back-facing triangles. This mode requires that the front and back colors be adjacent in the VUE. Previously, we would only place front and back colors adjacent in the VUE when two-sided color was enabled. Now we place them adjacent in the VUE whether two-sided color is enabled or not. (We still only swizzle the colors when two-sided color is enabled, so there should be no user-visible change). This simplifies the implementation of the VUE map and reduces the amount of code that is dependent on two-sided color mode. Reviewed-by: Eric Anholt <[email protected]>
* i965: GS: Use the VUE map to compute URB size.Paul Berry2011-09-062-17/+15
| | | | | | | | | | | The previous computation had two bugs: (a) it used a formula based on Gen5 for Gen6 and Gen7 as well. (b) it failed to account for the fact that PSIZ is stored in the VUE header. Fortunately, both bugs caused it to compute a URB size that was too large, which was benign. This patch computes the URB size directly from the VUE map, so it gets the result correct in all circumstances. Reviewed-by: Eric Anholt <[email protected]>
* i965: clip: Remove no-longer-needed variables.Paul Berry2011-09-062-33/+1
| | | | | | | | The variables offset[], idx_to_attr[], nr_bytes, nr_attrs, and header_regs were all serving purposes which are now served by the VUE map. Reviewed-by: Eric Anholt <[email protected]>
* i965: clip: Remove assumption about VUE header from brw_clip_interp_vertex()Paul Berry2011-09-061-5/+8
| | | | | | | | | | | Previously, brw_clip_interp_vertex() iterated only through the "non-header" elements of the VUE when performing interpolation (because header elements don't need interpolation). This code now refers exclusively to the VUE map to figure out which elements need interpolation, so that brw_clip_interp_vertex() doesn't need to know the header size. Reviewed-by: Eric Anholt <[email protected]>
* i965: clip: Change computation of nr_regs to use VUE map.Paul Berry2011-09-061-5/+5
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: clip: Convert computations to ..._to_offset() for clarity.Paul Berry2011-09-063-19/+51
| | | | | | | | This patch replaces some ad-hoc computations using ATTR_SIZE and the offset[] array to use the VUE map functions brw_vert_result_to_offset() and brw_vue_slot_to_offset(). Reviewed-by: Eric Anholt <[email protected]>
* i965: clip: Add a function to determine whether a vert_result is in use.Paul Berry2011-09-063-9/+22
| | | | | | | | Previously we would examine the offset[] array (since an offset of 0 meant "not in use"). This paves the way for removing the offset[] array. Reviewed-by: Eric Anholt <[email protected]>
* i965: clip: Rework brw_clip_interp_vertex() to use the VUE map.Paul Berry2011-09-061-5/+5
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: clip: Modify brw_clip_interp_vertex() to use the VUE map.Paul Berry2011-09-061-2/+2
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: clip: Move header_regs into brw_clip_compile.Paul Berry2011-09-062-5/+5
| | | | | | This makes header_regs available for computing VUE offsets within clip code. Reviewed-by: Eric Anholt <[email protected]>
* i965: clip: Modify brw_clip_tri_alloc_regs() to use the VUE map.Paul Berry2011-09-061-2/+5
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: clip: Move hpos_offest and ndc_offset into local functions.Paul Berry2011-09-066-17/+29
| | | | | | | | | The offsets within the VUE of HPOS and NDC are needed only in a few auxiliary clipping functions. This patch moves computation of those offsets into the functions that need them, and does the computation using the VUE map. Reviewed-by: Eric Anholt <[email protected]>
* i965: clip: rename header_position_offset to the more correct ndc_offset.Paul Berry2011-09-064-4/+4
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: clip: Add VUE map computation to clip stage for Gen4-5.Paul Berry2011-09-062-1/+7
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: SF: Change gen{6,7}_sf_state.c to compute URB read length based on VUE ↵Paul Berry2011-09-062-8/+24
| | | | | | map. Reviewed-by: Eric Anholt <[email protected]>
* i965: SF: Move outputs_written to a local variable for clarity.Paul Berry2011-09-062-4/+6
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: SF: New implementation of get_attr_override using the VUE map.Paul Berry2011-09-063-47/+78
| | | | | | | | This patch changes get_attr_override() (which computes the relationship between vertex shader outputs and fragment shader inputs) to use the VUE map. Reviewed-by: Eric Anholt <[email protected]>
* i965: SF: Remove unnecessary variables.Paul Berry2011-09-062-6/+2
| | | | | | | | | | This patch removes the variables nr_attrs and nr_setup_attrs, whose purpose is now being served by the VUE map. nr_attr_regs and nr_setup_regs are still needed, however they are now computed using the VUE map rather than by counting the number of vertex shader outputs (which caused subtle bugs when gl_PointSize was written). Reviewed-by: Eric Anholt <[email protected]>
* i965: SF: Stop using nr_setup_attrs in compute_masks.Paul Berry2011-09-061-1/+1
| | | | | | | | Previously, the SF used nr_setup_attrs to determine whether it was looking at the last element of the VUE. Changed this code to use the VUE map. Reviewed-by: Eric Anholt <[email protected]>
* i965: SF: Remove attr_to_idx and idx_to_attr.Paul Berry2011-09-062-13/+1
| | | | | | | | These data structures were serving the same purpose as the VUE map, but were buggy. Now that the code has been transitioned to use the VUE map, they are not needed. Reviewed-by: Eric Anholt <[email protected]>
* i965: SF: Change calculate_masks to use the VUE map.Paul Berry2011-09-061-4/+4
| | | | | | | | Previously, SF code used the idx_to_attr[] array to compute the location of entries in the VUE map. This array didn't properly account for gl_PointSize. Now we use the VUE map directly. Reviewed-by: Eric Anholt <[email protected]>
* i965: SF: Change the flags that refer to "attr" to be based on gl_vert_result.Paul Berry2011-09-061-5/+6
| | | | | | | | | | | | Previously, some of the code in SF erroneously used bitfields based on the gl_frag_attrib enum when actually referring to vertex results. This worked, because coincidentally the particular enum values being used happened to match between gl_frag_attrib and gl_vert_result. But it was fragile, because a future change to either gl_vert_result or gl_frag_attrib would have made the enum values stop matching up. This patch switches the SF code to use the correct enum. Reviewed-by: Eric Anholt <[email protected]>
* i965: SF: change get_vert_attr to use the VUE map, and rename it.Paul Berry2011-09-061-9/+14
| | | | | | | | | | | | The new function, called get_vert_result(), uses the VUE map to find the register containing a given vertex attribute. Previously, we used the attr_to_idx[] array, which served the same purpose but didn't account for gl_PointSize correctly. This fixes a bug on pre-Gen6 wherein the back side of a triangle would be rendered incorrectyl if the vertex shader wrote to gl_PointSize. Reviewed-by: Eric Anholt <[email protected]>
* i965: SF: Modify calculate_point_sprite_mask to use the VUE map.Paul Berry2011-09-063-13/+32
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: SF: Move the computation of urb_entry_read_offset.Paul Berry2011-09-062-4/+17
| | | | | | | | This patch moves the computation of the SF URB entry read offset from upload_sf_unit() to its own function, so that it can be re-used when creating the gen4-5 SF program. Reviewed-by: Eric Anholt <[email protected]>
* i965: new VS: Compute urb entry size based on the VUE map.Paul Berry2011-09-061-7/+2
| | | | | | | | Previously, the new VS backend computed the size of the URB entry by counting the number of MRFs used in emitting the URB entry. Now it just gets it straight from the VUE map. Reviewed-by: Eric Anholt <[email protected]>
* i965: new VS: Clarify comments about max_usable_mrf and add an assertion.Paul Berry2011-09-061-4/+8
| | | | | | | | | | max_usable_mrf has been carefully set such that (max_usable_mrf - base_mrf) is a multiple of 2, so that an even number of VUE slots are emitted with each URB write (which Gen6 requires). This patch adds an assertion to confirm that this is the case, and moves the comment to this effect to be near the assertion. Reviewed-by: Eric Anholt <[email protected]>
* i965: new VS: use the VUE map to write out vertex attributes.Paul Berry2011-09-062-113/+55
| | | | | | | | | | | | | Previously, the new VS backend used two functions, emit_vue_header_gen6() and emit_vue_header_gen4() to emit the fixed parts of the VUE, and then a pair of carefully-constructed loops to emit the rest of the VUE, leaving out the parts that were already emitted as part of the header. This patch changes the new VS backend to use the VUE map to emit the entire VUE. Reviewed-by: Eric Anholt <[email protected]>
* i965: new VS: move clip distance computation (GEN5+) to a separate function.Paul Berry2011-09-062-13/+23
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: new VS: Move PSIZ/flags computation to a separate function.Paul Berry2011-09-062-17/+23
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: new VS: move NDC computation (GEN4-5) to a separate function.Paul Berry2011-09-062-2/+9
| | | | Reviewed-by: Eric Anholt <[email protected]>
* i965: new VS: Use output_reg[] to find NDC and HPOS registers.Paul Berry2011-09-062-8/+14
| | | | | | | | | Previously, emit_vue_header_gen4() used local variables to keep track of which registers were storing the NDC and HPOS. This patch uses the output_reg[] array instead, so that the code that manipulates NDC and HPOS can be more easily refactored. Reviewed-by: Eric Anholt <[email protected]>
* i965: old VS: use the VUE map to compute the URB entry size.Paul Berry2011-09-062-25/+7
| | | | | | | | | | | | | | | | | | Previously, the old VS backend computed the URB entry size by adding the number of vertex shader outputs to the size of the URB header. This often produced a larger result than necessary, because some vertex shader outputs are stored in the header, so they were being double counted. This patch changes the old VS backend to compute the URB entry size directly from the number of slots in the VUE map. Note: there's a subtle change in that we no longer count header registers towards the size of the VF input. I believe this is correct, because the header is only emitted in the output of the VS stage--it is not present in the input. (As evidence for this, note that brw_vs_state.c sets urb_entry_read_offset to 0--it does not include space for the header as part of the VS input). Reviewed-by: Eric Anholt <[email protected]>
* i965: old VS: Use brw_vue_map instead of implicit assumptions about VUE ↵Paul Berry2011-09-062-111/+71
| | | | | | structure. Reviewed-by: Eric Anholt <[email protected]>
* i965: Add functions to compute offsets within the VUE map.Paul Berry2011-09-061-0/+18
| | | | | | | | Some parts of the i965 driver keep track of locations within the VUE (vertex URB entry) using byte offsets. This patch adds inline functions to compute these byte offsets using the VUE map. Reviewed-by: Eric Anholt <[email protected]>
* i965: Write code to compute a VUE map.Paul Berry2011-09-062-0/+168
| | | | | | | | | | | Several places in the i965 code make implicit assumptions about the structure of data in the VUE (vertex URB entry). This patch adds a function, brw_compute_vue_map(), which computes the structure of the VUE explicitly. Future patches will modify the rest of the driver to use the explicitly computed map rather than rely on implicit assumptions about it. Reviewed-by: Eric Anholt <[email protected]>
* Refactor code that converts between gl_vert_result and gl_frag_attrib.Paul Berry2011-09-065-41/+52
| | | | | | | | | | | | Previously, this conversion was duplicated in several places in the i965 driver. This patch moves it to a common location in mtypes.h, near the declaration of gl_vert_result and gl_frag_attrib. I've also added comments to remind us that we may need to revisit the conversion code when adding elements to gl_vert_result and gl_frag_attrib. Reviewed-by: Eric Anholt <[email protected]>
* docs: more info about non-subscriber list postingsBrian Paul2011-09-061-4/+7
|
* docs: update link, remove dead linksBrian Paul2011-09-065-17/+4
|