anv,hasvk,iris: sampler_prog_key::swizzles is only used on crocus
The field is no longer consumed by brw_complie_* and is instead handled directly by the crocus driver. Therefore, it's safe to leave it zero and not even bother setting it. This removes our reliance on the SWIZZLE_* macros in prog_instructions.h. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24288>
This commit is contained in:

committed by
Marge Bot

parent
1e29b3cee8
commit
079e8a9674
@@ -53,8 +53,7 @@
|
|||||||
.prefix.limit_trig_input_range = screen->driconf.limit_trig_input_range
|
.prefix.limit_trig_input_range = screen->driconf.limit_trig_input_range
|
||||||
#define BRW_KEY_INIT(gen, prog_id, limit_trig_input) \
|
#define BRW_KEY_INIT(gen, prog_id, limit_trig_input) \
|
||||||
.base.program_string_id = prog_id, \
|
.base.program_string_id = prog_id, \
|
||||||
.base.limit_trig_input_range = limit_trig_input, \
|
.base.limit_trig_input_range = limit_trig_input
|
||||||
.base.tex.swizzles[0 ... BRW_MAX_SAMPLERS - 1] = 0x688
|
|
||||||
|
|
||||||
struct iris_threaded_compile_job {
|
struct iris_threaded_compile_job {
|
||||||
struct iris_screen *screen;
|
struct iris_screen *screen;
|
||||||
|
@@ -209,6 +209,9 @@ PRAGMA_DIAGNOSTIC_ERROR(-Wpadded)
|
|||||||
struct brw_sampler_prog_key_data {
|
struct brw_sampler_prog_key_data {
|
||||||
/**
|
/**
|
||||||
* EXT_texture_swizzle and DEPTH_TEXTURE_MODE swizzles.
|
* EXT_texture_swizzle and DEPTH_TEXTURE_MODE swizzles.
|
||||||
|
*
|
||||||
|
* This field is not consumed by the back-end compiler and is only relevant
|
||||||
|
* for the crocus OpenGL driver for Broadwell and earlier hardware.
|
||||||
*/
|
*/
|
||||||
uint16_t swizzles[BRW_MAX_SAMPLERS];
|
uint16_t swizzles[BRW_MAX_SAMPLERS];
|
||||||
|
|
||||||
|
@@ -44,9 +44,6 @@
|
|||||||
#include "vk_render_pass.h"
|
#include "vk_render_pass.h"
|
||||||
#include "vk_util.h"
|
#include "vk_util.h"
|
||||||
|
|
||||||
/* Needed for SWIZZLE macros */
|
|
||||||
#include "program/prog_instruction.h"
|
|
||||||
|
|
||||||
struct lower_set_vtx_and_prim_count_state {
|
struct lower_set_vtx_and_prim_count_state {
|
||||||
nir_variable *primitive_count;
|
nir_variable *primitive_count;
|
||||||
};
|
};
|
||||||
@@ -382,16 +379,6 @@ void anv_DestroyPipeline(
|
|||||||
vk_free2(&device->vk.alloc, pAllocator, pipeline);
|
vk_free2(&device->vk.alloc, pAllocator, pipeline);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
populate_sampler_prog_key(const struct intel_device_info *devinfo,
|
|
||||||
struct brw_sampler_prog_key_data *key)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < BRW_MAX_SAMPLERS; i++) {
|
|
||||||
/* Assume color sampler, no swizzling. (Works for BDW+) */
|
|
||||||
key->swizzles[i] = SWIZZLE_XYZW;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
populate_base_prog_key(const struct anv_device *device,
|
populate_base_prog_key(const struct anv_device *device,
|
||||||
bool robust_buffer_acccess,
|
bool robust_buffer_acccess,
|
||||||
@@ -400,8 +387,6 @@ populate_base_prog_key(const struct anv_device *device,
|
|||||||
key->robust_buffer_access = robust_buffer_acccess;
|
key->robust_buffer_access = robust_buffer_acccess;
|
||||||
key->limit_trig_input_range =
|
key->limit_trig_input_range =
|
||||||
device->physical->instance->limit_trig_input_range;
|
device->physical->instance->limit_trig_input_range;
|
||||||
|
|
||||||
populate_sampler_prog_key(device->info, &key->tex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -42,9 +42,6 @@
|
|||||||
#include "vk_render_pass.h"
|
#include "vk_render_pass.h"
|
||||||
#include "vk_util.h"
|
#include "vk_util.h"
|
||||||
|
|
||||||
/* Needed for SWIZZLE macros */
|
|
||||||
#include "program/prog_instruction.h"
|
|
||||||
|
|
||||||
/* Eventually, this will become part of anv_CreateShader. Unfortunately,
|
/* Eventually, this will become part of anv_CreateShader. Unfortunately,
|
||||||
* we can't do that yet because we don't have the ability to copy nir.
|
* we can't do that yet because we don't have the ability to copy nir.
|
||||||
*/
|
*/
|
||||||
@@ -261,11 +258,7 @@ static void
|
|||||||
populate_sampler_prog_key(const struct intel_device_info *devinfo,
|
populate_sampler_prog_key(const struct intel_device_info *devinfo,
|
||||||
struct brw_sampler_prog_key_data *key)
|
struct brw_sampler_prog_key_data *key)
|
||||||
{
|
{
|
||||||
/* XXX: Handle texture swizzle on HSW- */
|
/* XXX: Handle texture swizzle Pre-HSW */
|
||||||
for (int i = 0; i < BRW_MAX_SAMPLERS; i++) {
|
|
||||||
/* Assume color sampler, no swizzling. (Works for BDW+) */
|
|
||||||
key->swizzles[i] = SWIZZLE_XYZW;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user