URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8ccae4fe28999f6353e188d6aa5834d24cc9f378 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 20:30:58 2014 -0700
i965: Delete sampler state structures. We've moved to using bitshifts (like we did for surface state); nothing uses the structures anymore. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8c2538e17cd3e0a2fa8f6f80f76eee4a293a90a Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 20:36:49 2014 -0700 i965: Replace sizeof(struct gen7_sampler_state) with the size itself. These are the last users of struct gen7_sampler_state. v2: Use a local sampler_state_size variable, to help distinguish the various 16s (suggested by Topi Pohjolainen). Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7da612e8d02d41eeb04935a41b20c66da103cc16 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 20:32:41 2014 -0700 i965: Drop sizeof(struct brw_sampler_state) from estimated prim size. This is the last user of the structure. v2: Use a local variable with a sensible name so people know what 16 is. (Suggested by Topi Pohjolainen). Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3d1a4d1f5b26400878fa99c723759a2c54721de2 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 20:49:32 2014 -0700 i965: Make BLORP use brw_emit_sampler_state(). This simplifies the code, removes use of the old structures, and also allows us to combine the Gen6 and Gen7+ code. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6b5b78b518c2b55bffec25f794de043a408976e0 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 20:43:40 2014 -0700 i965: Delete redundant sampler state dumping code. Although the Gen4-6 and Gen7+ variants used different structure types, they didn't use any of the fields - only the size, which is identical. So both decoders did exactly the same thing. Someday we should implement useful decoders for SAMPLER_STATE. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3f3e0be666339b7b2377123db1d6f09463c64bbd Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 18:10:53 2014 -0700 i965: Make some brw_sampler_state.c functions static again. Now that gen7_sampler_state.c is gone, everything is once again in a single file. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2fe2fe1fcea5c41edbbf30b1424ad2ac4ffeef43 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 13:15:56 2014 -0700 i965: Stop using gen7_update_sampler_state; rm gen7_sampler_state.c. The code in brw_sampler_state.c now handles all generations; we don't need the extra Gen7+ only code anymore. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7679393f561ca4f0e9c9587d4b208b035b7b9098 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 13:12:37 2014 -0700 i965: Make brw_update_sampler_state use 8 bits for LOD fields on Gen7+. This was the only actual difference between Gen4-6 and Gen7+ in terms of the values we program. The rest was just mechanical structure rearrangement. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a50b640dfe3580049e07bfdafb2e69410844359d Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 03:04:12 2014 -0700 i965: Make brw_update_sampler_state() use brw_emit_sampler_state(). Instead of stuffing bits directly into the brw_sampler_state structure, we now store them in local variables, then use brw_emit_sampler_state() to assemble the packet. This separates the decision about what values to use from the actual packet emission, which makes the code more reusable across generations. v2: Put const on a bunch of local variables and move declarations, as suggested by Topi Pohjolainen. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=05f0796eb68fe1be3e55b7c78c7660dccf44e0a1 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 12:58:20 2014 -0700 i965: Introduce a function to emit a SAMPLER_STATE structure. This simply assembles all the SAMPLER_STATE fields into their proper bit locations. Making it work on all generations was easy enough; some of the fields are even in the same place. Not used by anything yet, but will be soon. I made it non-static so BLORP can use it too. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7cdb0a30faf1c96bacf5cec2d64bb64d7c8ef4a8 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Wed Jul 30 10:50:12 2014 -0700 i965: Add const to upload_default_color's sampler parameter. It doesn't edit the value, and this lets us use const in more places. Needed to implement Topi's review comments for the next patch. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b590a1237c7dccdd2a197298dbd62bf8fb1c6d33 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 12:32:31 2014 -0700 i965: Add #defines for SAMPLER_STATE fields. We'll use these to replace the existing structures. I've adopted the convention that "BRW" applies to all hardware, and "GENX" applies starting with generation X, but might be replaced by some later generation. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=eee8196782d98e49876a34b51bf1e4c9b56acf2e Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 12:06:20 2014 -0700 i965: Convert wrap mode #defines to an enum. This makes it easy to tell that they're grouped together, and also improves gdb printing. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6afe21da6236f74acfb4daa6fbc4d6d1de700790 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 11:48:50 2014 -0700 i965: Delete gen7_upload_sampler_state_table and vtable mechanism. brw_upload_sampler_state_table now handles all generations, so we don't need the vtable mechanism either. There's still a lot of code duplication; the next patches will address that. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c2f231e18104e3300d9fab86600e7e0f6c77d1fb Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 11:36:33 2014 -0700 i965: Make brw_upload_sampler_state_table handle Gen7+ as well. This copies a few changes from gen7_upload_sampler_state_table; the next patch will delete that function. Gen7+ has per-stage sampler state pointer update packets, so we emit them as soon as we emit a new table for a stage. On Gen6 and earlier, we have a single packet, so we delay until we've changed everything that's going to be changed. v2: Split 3DSTATE_SAMPLER_STATE_POINTERS_XS packet emission into a helper function (suggested by Topi Pohjolainen). Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8fbc96ca74012d3f94564d88692e170bc4ef7937 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 11:27:57 2014 -0700 i965: Shift brw_upload_sampler_state_table away from structures. The Gen4-6 and Gen7+ code is virtually identical, but both use different structure types. Switching to use a uint32_t pointer and operate on the number of DWords will make it possible to share code. It turns out that SURFACE_STATE is the same number of DWords on every platform currently; it will be easy to handle a change there, though. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=378eea970824821ffb0d38c27e214af94ec0aca9 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 11:20:02 2014 -0700 i965: Push computation for sampler state batch offsets up a level. Other than this, brw_update_sampler_state only deals with a single SAMPLER_STATE structure, and doesn't need to know which position it is in the table. The caller takes care of dealing with multiple surface states. Pushing this up a level allows us to drop the ss_index parameter. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7efa183e8f5b66409f75a551c3fdfd652f7f205f Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 11:42:27 2014 -0700 i965: Drop unused 'ss_index' parameter from gen7_update_sampler_state. This was copied from the Gen4-6 code, but is unused. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a381592a8e5d17ea4448c7fecbcacd1d0e77b09d Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 02:34:02 2014 -0700 i965: Stop storing sdc_offset in brw_stage_state. sdc_offset is produced and consumed in the same function, so there's no need to store it in the context, nor pass pointers to it through various call chains. Saves 128 bytes per brw_stage_state structure, and makes the code clearer as well. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a1a8cb84d940313130e2ef4e7a94079fa4092b7 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Tue May 6 22:35:27 2014 -0700 i965: Drop the degenerate brw_sampler_default_color structure. It's just an array of four floats, and we have an array of four floats, so this is literally just a memcpy...but with custom structs and strange macros to give the appearance of doing something more. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c8e2549785e9adac768e47bd310b0537a1b269a4 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 12:03:21 2014 -0700 i965: Write a better file comment for brw_sampler_state.c. The old one has been inaccurate for years. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3f67fb4dc30ed662ffe23c1b8f64a25daec67cdc Author: Kenneth Graunke <kenn...@whitecape.org> Date: Sat Jul 26 01:26:54 2014 -0700 i965: Rename brw_wm_sampler_state.c to brw_sampler_state.c. When the driver was originally written, it only supported texturing in the pixel shader backend; vertex and geometry shader texturing came much later. Originally, the pixel shader was referred to as "WM" (the Windowizer/Masker unit). So, this code happened to only be relevant for the WM stage, at the time. However, sampler state really applies to all stages, so putting "wm" in the filename doesn't make sense. I dropped it in gen7_sampler_state.c; at this point the asymmetry just trips people up. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e120358340870795c22c42bd7dd7953b59f8296 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Tue Jul 29 13:33:43 2014 -0700 i965/blorp: Don't set min_mag_neq bit in Gen6 SAMPLER_STATE. The "Min/Mag State Not Equal" bit is supposed to be set when the min/mag filters or address rounding modes differ. BLORP uses identical min/mag settings, so the bit should be unset. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolai...@intel.com> _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit