[igt-dev] [PATCH i-g-t v30 11/33] lib/rendercopy: remove libdrm dependency
Chris Wilson
chris at chris-wilson.co.uk
Wed Aug 19 12:43:26 UTC 2020
Quoting Zbigniew Kempczyński (2020-08-19 13:32:44)
> -static inline void emit_vertex_2s(struct intel_batchbuffer *batch,
> +static inline void emit_vertex_2s(struct intel_bb *ibb,
> int16_t x, int16_t y)
> {
> - OUT_BATCH((uint16_t)y << 16 | (uint16_t)x);
> + intel_bb_out(ibb, ((uint16_t)y << 16 | (uint16_t)x));
Whoops, this is technically undefined behaviour. We need to cast to
(uint32_t)y << 16 to avoid 'int' promotion.
-Chris
More information about the igt-dev
mailing list