2 * Copyright © 2013 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 #include "glsl/ralloc.h"
25 #include "brw_blorp_blit_eu.h"
27 brw_blorp_eu_emitter::brw_blorp_eu_emitter(struct brw_context
*brw
)
28 : mem_ctx(ralloc_context(NULL
))
30 brw_init_compile(brw
, &func
, mem_ctx
);
33 * By default everything is emitted as 16-wide with only a few expections
34 * handled explicitly either here in the compiler or by one of the specific
35 * code emission calls.
36 * It should be also noted that here in this file any alterations of the
37 * compression control settings are only used to affect the execution size
38 * of the instructions. The instruction template used to initialise all the
39 * instructions is effectively not altered -- the value stays at zero
40 * representing either GEN6_COMPRESSION_1Q or GEN6_COMPRESSION_1H depending
42 * If any other settings are used in the instruction headers, they are set
43 * elsewhere by the individual code emission calls.
45 brw_set_compression_control(&func
, BRW_COMPRESSION_COMPRESSED
);
48 brw_blorp_eu_emitter::~brw_blorp_eu_emitter()
54 brw_blorp_eu_emitter::get_program(unsigned *program_size
, FILE *dump_file
)
56 brw_set_uip_jip(&func
);
58 if (unlikely(INTEL_DEBUG
& DEBUG_BLORP
)) {
59 printf("Native code for BLORP blit:\n");
60 brw_dump_compile(&func
, dump_file
, 0, func
.next_insn_offset
);
64 return brw_get_program(&func
, program_size
);