summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-08-31 15:45:57 -0700
committerKenneth Graunke <[email protected]>2017-09-02 12:56:18 -0700
commit23b7c7a630aafb2102d3292556eecd84d2739ed5 (patch)
tree122791c87b308ecc92fa4c69af98cb61ee3c2a50
parentb8cd8a75452b76db5a0b0e7cb70b1f6149255a18 (diff)
genxml: Make Border Color Pointer an address on Gen4-5, not an offset.
Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r--src/intel/genxml/gen4.xml2
-rw-r--r--src/intel/genxml/gen45.xml2
-rw-r--r--src/intel/genxml/gen5.xml2
-rw-r--r--src/mesa/drivers/dri/i965/genX_state_upload.c10
4 files changed, 7 insertions, 9 deletions
diff --git a/src/intel/genxml/gen4.xml b/src/intel/genxml/gen4.xml
index 6f6f1bfeb09..6499346c999 100644
--- a/src/intel/genxml/gen4.xml
+++ b/src/intel/genxml/gen4.xml
@@ -586,7 +586,7 @@
<field name="TCX Address Control Mode" start="38" end="40" type="Texture_Coordinate_Mode"/>
<field name="TCY Address Control Mode" start="35" end="37" type="Texture_Coordinate_Mode"/>
<field name="TCZ Address Control Mode" start="32" end="34" type="Texture_Coordinate_Mode"/>
- <field name="Border Color Pointer" start="69" end="95" type="offset"/>
+ <field name="Border Color Pointer" start="69" end="95" type="address"/>
<field name="ChromaKey Enable" start="121" end="121" type="bool"/>
<field name="ChromaKey Index" start="119" end="120" type="uint"/>
<field name="ChromaKey Mode" start="118" end="118" type="uint" prefix="KEYFILTER">
diff --git a/src/intel/genxml/gen45.xml b/src/intel/genxml/gen45.xml
index 7b2f7698274..0f905754071 100644
--- a/src/intel/genxml/gen45.xml
+++ b/src/intel/genxml/gen45.xml
@@ -593,7 +593,7 @@
<field name="TCX Address Control Mode" start="38" end="40" type="Texture_Coordinate_Mode"/>
<field name="TCY Address Control Mode" start="35" end="37" type="Texture_Coordinate_Mode"/>
<field name="TCZ Address Control Mode" start="32" end="34" type="Texture_Coordinate_Mode"/>
- <field name="Border Color Pointer" start="69" end="95" type="offset"/>
+ <field name="Border Color Pointer" start="69" end="95" type="address"/>
<field name="Monochrome Filter Height" start="125" end="127" type="uint"/>
<field name="Monochrome Filter Width" start="122" end="124" type="uint"/>
<field name="ChromaKey Enable" start="121" end="121" type="bool"/>
diff --git a/src/intel/genxml/gen5.xml b/src/intel/genxml/gen5.xml
index 36081875ea4..70f50076abf 100644
--- a/src/intel/genxml/gen5.xml
+++ b/src/intel/genxml/gen5.xml
@@ -571,7 +571,7 @@
<field name="TCX Address Control Mode" start="38" end="40" type="Texture_Coordinate_Mode"/>
<field name="TCY Address Control Mode" start="35" end="37" type="Texture_Coordinate_Mode"/>
<field name="TCZ Address Control Mode" start="32" end="34" type="Texture_Coordinate_Mode"/>
- <field name="Border Color Pointer" start="69" end="95" type="offset"/>
+ <field name="Border Color Pointer" start="69" end="95" type="address"/>
<field name="Monochrome Filter Height" start="125" end="127" type="uint"/>
<field name="Monochrome Filter Width" start="122" end="124" type="uint"/>
<field name="ChromaKey Enable" start="121" end="121" type="bool"/>
diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c
index 4eb1a79bcd4..7083e7b2d6b 100644
--- a/src/mesa/drivers/dri/i965/genX_state_upload.c
+++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
@@ -5008,13 +5008,11 @@ genX(update_sampler_state)(struct brw_context *brw,
texObj->StencilSampling,
&border_color_offset);
}
- if (GEN_GEN < 6) {
- samp_st.BorderColorPointer =
- brw_emit_reloc(&brw->batch, batch_offset_for_sampler_state + 8,
- brw->batch.bo, border_color_offset, 0);
- } else {
+#if GEN_GEN < 6
+ samp_st.BorderColorPointer = ro_bo(brw->batch.bo, border_color_offset);
+#else
samp_st.BorderColorPointer = border_color_offset;
- }
+#endif
#if GEN_GEN >= 8
samp_st.LODPreClampMode = CLAMP_MODE_OGL;