[Mesa-dev] [PATCH 02/19] i965: Mark brw_reg_type and register_file enums as PACKED.
Matt Turner
mattst88 at gmail.com
Thu Feb 20 13:41:15 PST 2014
Will now take a byte, rather than four.
---
src/mesa/drivers/dri/i965/brw_reg.h | 3 ++-
src/mesa/drivers/dri/i965/brw_shader.h | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_reg.h b/src/mesa/drivers/dri/i965/brw_reg.h
index 978dd3f..6f48b7d 100644
--- a/src/mesa/drivers/dri/i965/brw_reg.h
+++ b/src/mesa/drivers/dri/i965/brw_reg.h
@@ -43,6 +43,7 @@
#define BRW_REG_H
#include <stdbool.h>
+#include "main/compiler.h"
#include "program/prog_instruction.h"
#include "brw_defines.h"
@@ -88,7 +89,7 @@ brw_is_single_value_swizzle(int swiz)
swiz == BRW_SWIZZLE_WWWW);
}
-enum brw_reg_type {
+enum PACKED brw_reg_type {
BRW_REGISTER_TYPE_UD = 0,
BRW_REGISTER_TYPE_D,
BRW_REGISTER_TYPE_UW,
diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h
index 4c79861..4d98cbc 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.h
+++ b/src/mesa/drivers/dri/i965/brw_shader.h
@@ -23,11 +23,12 @@
#include <stdint.h>
#include "brw_defines.h"
+#include "main/compiler.h"
#include "glsl/ir.h"
#pragma once
-enum register_file {
+enum PACKED register_file {
BAD_FILE,
GRF,
MRF,
--
1.8.3.2
More information about the mesa-dev
mailing list