pan/decode: Cleanup sample locations decode
We know what this is now. I opted to leave it in ~fixed-point format to avoid bikeshedding over precision. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774>
This commit is contained in:
@@ -254,34 +254,21 @@ pandecode_render_target(uint64_t gpu_va, unsigned job_no, bool is_bifrost, unsig
|
||||
}
|
||||
|
||||
static void
|
||||
pandecode_mfbd_bifrost_deps(const void *fb, int job_no)
|
||||
pandecode_sample_locations(const void *fb, int job_no)
|
||||
{
|
||||
pan_section_unpack(fb, MULTI_TARGET_FRAMEBUFFER, BIFROST_PARAMETERS, params);
|
||||
|
||||
/* The blob stores all possible sample locations in a single buffer
|
||||
* allocated on startup, and just switches the pointer when switching
|
||||
* MSAA state. For now, we just put the data into the cmdstream, but we
|
||||
* should do something like what the blob does with a real driver.
|
||||
*
|
||||
* There seem to be 32 slots for sample locations, followed by another
|
||||
* 16. The second 16 is just the center location followed by 15 zeros
|
||||
* in all the cases I've identified (maybe shader vs. depth/color
|
||||
* samples?).
|
||||
*/
|
||||
|
||||
struct pandecode_mapped_memory *smem =
|
||||
pandecode_find_mapped_gpu_mem_containing(params.sample_locations);
|
||||
|
||||
const u16 *PANDECODE_PTR_VAR(samples, smem, params.sample_locations);
|
||||
|
||||
pandecode_log("uint16_t sample_locations_%d[] = {\n", job_no);
|
||||
pandecode_indent++;
|
||||
for (int i = 0; i < 32 + 16; i++) {
|
||||
pandecode_log("%d, %d,\n", samples[2 * i], samples[2 * i + 1]);
|
||||
pandecode_log("Sample locations:\n");
|
||||
for (int i = 0; i < 33; i++) {
|
||||
pandecode_log(" (%d, %d),\n",
|
||||
samples[2 * i] - 128,
|
||||
samples[2 * i + 1] - 128);
|
||||
}
|
||||
|
||||
pandecode_indent--;
|
||||
pandecode_log("};\n");
|
||||
}
|
||||
|
||||
static struct pandecode_fbd
|
||||
@@ -294,7 +281,7 @@ pandecode_mfbd_bfr(uint64_t gpu_va, int job_no, bool is_fragment, bool is_comput
|
||||
struct pandecode_fbd info;
|
||||
|
||||
if (is_bifrost)
|
||||
pandecode_mfbd_bifrost_deps(fb, job_no);
|
||||
pandecode_sample_locations(fb, job_no);
|
||||
|
||||
pandecode_log("Multi-Target Framebuffer:\n");
|
||||
pandecode_indent++;
|
||||
|
Reference in New Issue
Block a user